DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7164>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7164 DOMParser with a DTD leak! Summary: DOMParser with a DTD leak! Product: Xerces-C++ Version: 1.6.0 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Major Priority: Other Component: Non-Validating Parser AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Hi, I have found a bug.. it seems the parser leaks since version 1.4. Its might be related to the bug #812 and might be related to the split DTDValidator/DTDScanner/DTDgrammar that was made. Parsing a document with an intern DTD can leak. It's really easy to reproduce... Just use the sample DOMCount and add a loop to parse the doc something like 1000 times... The leak is concerning Attribute lists. It leaks a lot when the attribute are in multiple ATTLIST declaration (1). If they are in the same ATTLIST declaration (2), the leak is a lot less important (but it's still there). Also, it's when using default values. Here's an example: 1: <?xml version="1.0"?> <!DOCTYPE dummy [ <!ELEMENT criteria EMPTY > <!ATTLIST criteria NAME CDATA #IMPLIED > <!ATTLIST criteria TYPE (Index | Hits | Property) "Index"> <!ATTLIST criteria ALPHAORDER (True | False) "False"> <!ATTLIST criteria REVERSEORDER (True | False) "False"> <!ATTLIST criteria NOVALUEFIRST (True | False) "False"> ]> <dummy VERSION="2.0"> </dummy> 2: <?xml version="1.0"?> <!DOCTYPE dummy [ <!ELEMENT criteria EMPTY > <!ATTLIST criteria NAME CDATA #IMPLIED TYPE (Index | Hits | Property) "Index" ALPHAORDER (True | False) "False" REVERSEORDER (True | False) "False" NOVALUEFIRST (True | False) "False"> ]> <dummy VERSION="2.0"> </dummy> the first document leaks a lot!!! Note that I use a non-validating DOMParser... something like that: // Creating the InputSource from the BSTR const char* pchBufId = "MemDOMParser"; MemBufInputSource memBufIS( const_cast<XMLByte*>(reinterpret_cast<const XMLByte*>( pXML ) ), size, pchBufId, false ); DOMParser NonValidatingDOMParser; NonValidatingDOMParser.setErrorHandler( &errorHandler ); NonValidatingDOMParser.setEntityResolver( &entityHandler ); NonValidatingDOMParser.parse( memBufIS ); I really need a clean version of xerces 1-6 really quick, so i would really appreciate if someone could help me as fast as possible. It's urgent and I can't use the version with that leak since my app is a server that does a lot of parsing... Thanks a lot! --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
