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

Memory allocation does not always go through the MemoryManager

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1.1
    • Fix Version/s: 4.0.0
    • Component/s: Miscellaneous
    • Labels:
      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

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

              Dates

              • Created:
                Updated: