Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
1.5.1
-
None
-
Operating System: Linux
Platform: PC
-
4141
Description
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>