Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-1350

DTDElementDecl lazy initialization not thread safe.

    XMLWordPrintableJSON

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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            weissman Mark Weissman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: