Message: The following issue has been resolved as INCOMPLETE.
Resolver: cargilld Date: Thu, 22 Apr 2004 5:36 AM I am closing this bug due to lack of response. Feel free to reopen if this is still an issue. David --------------------------------------------------------------------- View the issue: http://issues.apache.org/jira/browse/XERCESC-987 Here is an overview of the issue: --------------------------------------------------------------------- Key: XERCESC-987 Summary: Memory leak in xerces library Type: Bug Status: Resolved Resolution: INCOMPLETE Project: Xerces-C++ Components: Validating Parser (DTD) Versions: 2.3.0 Assignee: Reporter: Siddharth Toshniwal Created: Mon, 25 Aug 2003 2:40 PM Updated: Thu, 22 Apr 2004 5:36 AM Environment: Operating System: Solaris Platform: Sun Description: Hi, Am developing an application on Solaris 2.8 using the Xerces SAX2 parser (library version 2.3.0) in which I do validation using an external DTD. Am facing a memory leak in the app in both the following cases: a. XML document gets parsed successfully, b. XML document fails to parse due to DTD validation failure. To verify whether this leak is in the library code or my application, I instrumented the SAX2Count application (provided in the Xerces package) with purify (Version 2003.06.00 Solaris 2) and ran the same giving it the XML document written below. I got the following purify report. -------------- Purify report for sample begin -------------- MLK: 24 bytes leaked at 0xcceb8 * This memory was allocated from: malloc [rtlib.o] new_eh_context [libgcc2.c] eh_context_specific [libgcc2.c] eh_context_initialize [libgcc2.c] __get_eh_info [libgcc2.c] __cp_push_exception [exception.cc:215] xercesc_2_3::XMLURL::setURL(const unsigned short*,const unsigned short*) [libxerces- c.so.23] xercesc_2_3::XMLURL::xercesc_2_3::XMLURL(const unsigned short*,const unsigned short*,xercesc_2_3::MemoryManager*) [libxerces- c.so.23] xercesc_2_3::ReaderMgr::createReader(const unsigned short*,const unsigned short*,bool,xercesc_2_3::XMLReader::RefFrom,xercesc_2_3::XMLReader::Types,xercesc_2_3::XMLReader::Sources,xercesc_2_3::InputSource*&,bool) [libxerces-c.so.23] xercesc_2_3::IGXMLScanner::scanDocTypeDecl() [libxerces- c.so.23] xercesc_2_3::XMLScanner::scanProlog() [libxerces- c.so.23] xercesc_2_3::IGXMLScanner::scanDocument(const xercesc_2_3::InputSource&) [libxerces- c.so.23] xercesc_2_3::XMLScanner::scanDocument(const unsigned short*) [libxerces- c.so.23] xercesc_2_3::XMLScanner::scanDocument(const char*) [libxerces- c.so.23] xercesc_2_3::SAX2XMLReaderImpl::parse(const char*) [libxerces- c.so.23] main [SAX2Count.o] _start [crt1.o] --------------- Purify report for sample end --------------- The leak is not in the same location as where I got it for my app, but even my leak is caused due to an exception thrown within the Xerces DTDValidator code. Is there an issue in which the exceptions are thrown? Or is there some problem with purify? The difference between SAX2Count and my app is that I've implemented the resolveEntity(), error() and fatalError() callbacks in my cbk handler. -------------- Purify report for my app begin -------------- MLK: 24 bytes leaked at 0x116f50 * This memory was allocated from: malloc [rtlib.o] new_eh_context [libgcc2.c] eh_context_specific [libgcc2.c] eh_context_initialize [libgcc2.c] __get_eh_info [libgcc2.c] __cp_push_exception [exception.cc:215] xercesc_2_3::ReaderMgr::popReader() [libxerces- c.so.23] xercesc_2_3::ReaderMgr::skipPastSpaces() [libxerces- c.so.23] xercesc_2_3::DTDScanner::scanExtSubsetDecl(bool,bool) [libxerces- c.so.23] xercesc_2_3::IGXMLScanner::scanDocTypeDecl() [libxerces- c.so.23] xercesc_2_3::XMLScanner::scanProlog() [libxerces- c.so.23] xercesc_2_3::IGXMLScanner::scanDocument(const xercesc_2_3::InputSource&) [libxerces- c.so.23] xercesc_2_3::XMLScanner::scanDocument(const unsigned short*) [libxerces- c.so.23] xercesc_2_3::XMLScanner::scanDocument(const char*) [libxerces- c.so.23] xercesc_2_3::SAX2XMLReaderImpl::parse(const char*) [libxerces- c.so.23] Sdf_fn_parseCPL(const char*,Sdf_tg_cplStruct**,unsigned int*) [sdfcplxerparser.cpp:1220] main [sdfcplutility.cpp:1443] _start [crt1.o] --------------- Purify report for my app end --------------- Can you please investigate? Also, please let me know in case you need any further inputs? I would have liked to attatch the XML and the DTD files, but I don't see a way of doing that in the web interface. Please mail me in case you need those to investigate. Thanks for your help. Siddharth. --------------------------------------------------------------------- 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]