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: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to