The following comment has been added to this issue:
Author: David Bertoni
Created: Thu, 8 Jul 2004 1:52 PM
Body:
The bug is in your code. You are terminating Xerces-C before all Xerces-C objects are
destroyed. Try the following:
int main(int argC, char* argV[])
{
XMLPlatformUtils::Initialize();
{
SAX2XMLReader* parser = XMLReaderFactory::createXMLReader();
fudHandlers handler(encodingName, unRepFlags, expandNamespaces);
parser->setContentHandler(&handler);
XERCES_STD_QUALIFIER cerr << "Nuking parser...\n";
delete parser;
}
XMLPlatformUtils::Terminate();
return 0;
}
---------------------------------------------------------------------
View this comment:
http://issues.apache.org/jira/browse/XERCESC-1241?page=comments#action_36575
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/XERCESC-1241
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XERCESC-1241
Summary: XMLFormatter attempts to deallocate unallocated memory
Type: Bug
Status: Unassigned
Priority: Major
Project: Xerces-C++
Components:
Utilities
Versions:
2.5.0
Assignee:
Reporter: D. North
Created: Thu, 8 Jul 2004 12:57 PM
Updated: Thu, 8 Jul 2004 1:52 PM
Environment: Not needed
Description:
In line 399 of framework/XMLFormatter.cpp, there is the statement:
fMemoryManager->deallocate(fAposRef); //delete [] fAposRef;
Unfortunately, in order for this to succeed without sigsegv'ng, fAposRef must be
non-null, which is [apparently] possible only if the right stuff has been passed into
a call to XMLFormatter::formatBuf(...
Reference XERCESC-71 for a related change in this area.
I can provide sample code that demonstrates the failure if needed.
Regards.
David.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]