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/13 06:35:16 UTC
DO NOT REPLY [Bug 4141] New: -
Memory leak when validating simple DTD
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=4141>.
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=4141
Memory leak when validating simple DTD
Summary: Memory leak when validating simple DTD
Product: Xerces-C++
Version: 1.5.1
Platform: PC
OS/Version: Linux
Status: NEW
Severity: Major
Priority: Other
Component: Validating Parser (DTD)
AssignedTo: xerces-c-dev@xml.apache.org
ReportedBy: klep@reactivity.com
We believe we have discovered a repeatable memory leak when validating even a
simple DTD. The size of the leak scales linearly both with the size of the DTD
and the number of times that it is used to validate XML input. The leak was
confirmed by using the SAXPrint tool that comes with the distribution and the
DMALLOC memory leak detection tool.
Our inputs were as follows:
smallleak.dtd:
<?xml encoding="ISO-8859-1"?>
<!ELEMENT personnel (person)+>
<!ELEMENT person ANY>
bigleak.dtd:
<?xml encoding="ISO-8859-1"?>
<!ELEMENT personnel (person)+>
<!ELEMENT person (akshay*, garg*, farm*)>
<!ELEMENT akshay ANY>
<!ATTLIST akshay name CDATA #IMPLIED>
<!ELEMENT garg ANY>
<!ELEMENT farm ANY>
input.xml:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE personnel SYSTEM "smallleak.dtd">
<!-- change to bigleak.dtd and note size of unfreed memory increases -->
<personnel><person></person></personnel>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org