Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
2.4.0
-
None
-
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