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

GrammarResolver.cpp allocates XMLSchemaDescription out of wrong pool

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.6.0
    • None
    • None
    • Solaris

    Description

      GrammarResolver.cpp allocates XMLSchemaDescription out of wrong pool

      This causes a memory leak and thread safety issues when sharing
      an unsynchronized grammar pool across multiple threads. I included diffs
      that affect my application. It would be good if somebody could check all uses of
      fGrammarPoolMemoryManager to verify the immutability of cached grammars
      and thread safety for the GrammarPool. When not parsing grammars, the
      pool should not change. I think fGrammarPool->createSchemaDescription may
      be generally dangerous.

      < XMLSchemaDescription* gramDesc = new (fMemoryManager) XMLSchemaDescriptionImpl(namespaceKey, fMemoryManager);

      > XMLSchemaDescription* gramDesc = fGrammarPool->createSchemaDescription(namespaceKey);

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: