#39080 [Opn]: Memory leak in XSLTProcessor->transformToDoc()
ID: 39080
User updated by: odinuv at gmail dot com
Reported By: odinuv at gmail dot com
Status: Open
Bug Type: XSLT related
Operating System: win32
PHP Version: 5CVS-2006-10-07 (snap)
New Comment:
After some more investigation i found an XML input very similar to the
first one but it doesn't trigger the problem. The only diference is
that it doesn't contain the HTML content in nodes <content>. I posted
the XML on the web, the URL is:
http://virklis.cust.ignum.cz/transformToDoc/2.xml
That is:
1.xml causes the memory problem
2.xml does not cause that problem
Previous Comments:
------------------------------------------------------------------------
[2006-10-10 18:59:11] odinuv at gmail dot com
I don't think i have libxml or libxslt installed. I use php_xsl.dll
bundled with the instalation which in my case says version 5.2.0.0. and
that afaik doesn't need libxslt
------------------------------------------------------------------------
[2006-10-10 07:01:53] chregu@php.net
Which libxml2 and libxslt versions are you using? Could you try with
the latest ones (if not already used).
------------------------------------------------------------------------
[2006-10-07 22:31:28] odinuv at gmail dot com
Since the script is 40 lines long i provided the link (as suggested)
I'll write all the links directly:
PHP script source code:
http://virklis.cust.ignum.cz/transformToDoc/test.txt
XSLT Input file (1st argument):
http://virklis.cust.ignum.cz/transformToDoc/1.xsl
XML Input file (2nd argument):
http://virklis.cust.ignum.cz/transformToDoc/1.xml
DTD:
http://virklis.cust.ignum.cz/transformToDoc/character-entities.dtd
The script is 40 lines long to
- load the input files
- do the transformation
- determine memory used by php
If it were shorter it wouldn't be complete. The input files are
necessary for the problem to arise.
------------------------------------------------------------------------
[2006-10-07 21:29:32] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
------------------------------------------------------------------------
[2006-10-07 19:35:39] odinuv at gmail dot com
Description:
------------
Using a certain data the function call to
XSLTProcessor->transformToDoc() produces a 2kb-4kb memory leak. This
happens *only* on win32 (tested on NT 5.0 build 2195 and
NT 5.2 build 3790) platform. Reproduced succesfully on apache 2.0.55
and 2.0.59 with php 5.1.6 and todays snapshot 5.2.0RC6-dev.
Reproduce code:
---------------
Code is standard (taken from manual) procedure to transform XML+XSTL
into a HTML document. Both URLs contain same files:
1.xml - source XML data
1.xsl - source XSLT data
character-entities.dtd - necessery entities definitions
test.txt - PHP source code for the transformation
URL1: (not online 24/7, showing the current php process usage on
server) https://81.27.200.150:13580/transformToDoc/test.php
URL2: (online 24/7, not showing the current mem usage - for downloading
only) http://virklis.cust.ignum.cz/transformToDoc/test.php
Actual result:
--------------
Every page refresh produces a 2-4Kb raise in memory used by PHP (see
live on https://81.27.200.150:13580/transformToDoc/test.php)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39080&edit=1
Thread (9 messages)