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

seg fault/null pointer when invoking 'XMLReaderFactory::createXMLReader();'

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 2.7.0
    • None
    • SAX/SAX2
    • None
    • 1) windows XP SP2, build with Visual Studio 8
      2) fedora core 4, run with both g++ 4.0.0 and 3.4.3

    Description

      void* XMemory::operator new(size_t size, MemoryManager* manager)
      {
      //** with assertions enabled, the following fails...
      assert(manager != 0);

      size_t headerSize = XMLPlatformUtils::alignPointerForNewBlockAllocation(sizeof(MemoryManager*));

      /** with assertions disabled, the next line of code fails...manager pointer is null
      void* const block = manager->allocate(headerSize + size);
      (MemoryManager*)block = manager;

      return (char*)block + headerSize;
      }

      -------------------------------------------------------------------

      On fedora core 4, my program gets a segmentation fault when I link to the library from distribution xerces-c_2_7_0-redhat_AS4-gcc_343.

      Attachments

        Activity

          People

            Unassigned Unassigned
            hwy146 JohnV
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: