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

MemBufInputSource constructor produces a core on linux but not on solaris (was:Bugzilla#28385)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 2.4.0
    • None
    • DOM
    • None
    • any linux; not on solaris

    Description

      (Manually transferred from Bugzilla#28385 Please address questions to original reporter jmf@abysal.com)

      There is a possible bug in Xerces-C 2.4.0 on linux platforms. This doesn't occur with solaris.

      The next small program code generates a segmentation fault:

      #include <xercesc/util/PlatformUtils.hpp>
      #include <xercesc/util/XMLString.hpp>
      #include <xercesc/dom/DOM.hpp>
      #include <xercesc/framework/MemBufInputSource.hpp>

      static const char *xml_buff =
      "<?xml version='1.0' encoding='ISO-8859-1' ?><root></root>";

      using namespace xercesc;

      int main( int argc, char *argv[] )
      {
      XMLPlatformUtils::Initialize( "es_ES" );

      MemBufInputSource
      memDoc( (XMLByte *) xml_buff, strlen( xml_buff ), "tmp.xml", false );

      XMLPlatformUtils::Terminate();
      return 0;
      }

      If I alloc the MemBufInputSource with new, there is no problem.

      Thanks and best regards

      Attachments

        Activity

          People

            Unassigned Unassigned
            curcuru Shane Curcuru
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: