You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2001/10/03 16:01:33 UTC
DO NOT REPLY [Bug 3938] New: -
Memory leak when using the DOMParser
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=3938>.
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=3938
Memory leak when using the DOMParser
Summary: Memory leak when using the DOMParser
Product: Xerces-C++
Version: 1.5.1
Platform: Alpha
OS/Version: Other
Status: NEW
Severity: Major
Priority: Other
Component: Validating Parser (DTD)
AssignedTo: xerces-c-dev@xml.apache.org
ReportedBy: Oberson@nagra.com
CC: Oberson@nagra.com
Hello,
We found a memory leak in Xerces 1.5.1 (and also in Xerces v1.4) C++ when using
the DOMParser. The leak occurs both when we specify an input file or when we
use a membug as input source to the parsing method.
The XML file passed as parameter to the method "parse" contains a
DOCTYPE instruction refering to a valid DTD. The DTD itself includes another
valid DTD. All XML files and DTD files are located in the working directory.
We tried to use both Xerces v1.4.0 and xerces v1.5.1 and both versions have the
problem. However, Xerces v1.5.1 does not leak if the argument setDoValidation
is set to 0.
Looking at the bug report archive, it seems that this problem has already been
reported to you. Is it fixed now, and, if yes, when do you plan to release a
version of Xerces with the fix in? Thanks in advance for your help. Best regards
Pierre Oberson
Project Manager
Nagravision S.A.
Kudelski Group
P.S.: below is a sample program that reproduces the leak.
=============================================
Sample program
=============================================
#include <iostream.h>
#include <framework/MemBufInputSource.hpp>
#include <util/PlatformUtils.hpp>
#include <parsers/DOMParser.hpp>
main( ) {
int step=0;
const char* fileName = "test.xml";
cout << "Initialize platform" << endl;
XMLPlatformUtils::Initialize();
while( 1 ) {
DOMParser parser;
parser.setDoValidation( 1 );
parser.parse( fileName );
if( step++ %100 == 0 ) {
cout << step << endl;
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org