Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.0.0, 3.0.1, 3.1.0, 3.1.1, 3.1.2, 3.2.0, 3.1.3, 3.1.4
-
None
-
None
-
Solaris
Description
DTDElementDecl.cpp && DTDElementDecl.hpp perform lazy evaluation on many
of the get() methods. This is used in cached grammars which may
be shared by multiple threads and accessed unsynchonized.
Lazy initialization is generally a bad pattern, but particularly in multithreaded
applications. It should be disabled for shared grammars.
I work around this by calling all the getters when I create my Grammar pool
but I think this should not be necessary.
It would be good if somebody could check all the lazy evaluations that might
affect shared grammars.