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

Memory allocation does not always go through the MemoryManager

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.1.1
    • 4.0.0
    • Miscellaneous
    • None

    Description

      When trying to use Xerces with the pluggable MemoryManager I discovered that on several occasions objects are instantiated with the global new operator that does not use the memory manager. Here are some of those cases:

      • initializing the EncodingValidator in EncodingValidator.cpp
      • creating a DOMImplementationListImpl in DOMImplementationImpl.cpp and DOMImplementationRegistry.cpp
      • creating a DOMNodeListImpl in DOMNodeImpl.cpp
      • creating a DOMDocumentTypeImpl in DOMImplementationImpl.cpp
      • creating a XMLCh array in XMLString.cpp
        ...

      In our code we essentially forbid the use of plain global "new" so the above cases blow up when Xerces is linked against our codebase.

      I will post a patch soon with the suggested fixes.

      Attachments

        1. patch
          9 kB
          Lyublena Antova

        Activity

          People

            Unassigned Unassigned
            lublena Lyublena Antova
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: