Bug #70078 [NEW]: Memleak when calling PHP functions from XSL with nodes as parameter
From: mplomer at gmx dot de
Operating system: any
PHP version: 5.6.11
Package: XSLT related
Bug Type: Bug
Bug description:Memleak when calling PHP functions from XSL with nodes as parameter
Description:
------------
When calling registered PHP functions in XSLTProcessor from a XSL
stylesheet with references to nodes as parameter, you will notice bad
performence and - depending on XML structure - a big memleak.
Test-Script see:
https://gist.github.com/not-implemented/bb41831a4892f1459e5b
Until 5.4.23 you have ~25 MB RAM usage of the process at the end
Starting with 5.4.24 you have ~1030 MB RAM usage of the process at the
end
Please notice, that this high usage is NOT covered by
memory_get_usage().
When passing a fixed string to the function instead of ".", the problem
ist not reproducable.
This seems to be introduced in Bug #49634 between 5.4.23 and 5.4.24 (or
maybe ~5.5.7 and 5.5.8) where nodes are recursively duplicated now.
Expected result:
----------------
Memory usage ~25 MB RAM
Actual result:
--------------
Memory usage ~1030 MB RAM
--
Edit bug report at https://bugs.php.net/bug.php?id=70078&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70078&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70078&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70078&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=70078&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=70078&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=70078&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=70078&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=70078&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=70078&r=support
Expected behavior: https://bugs.php.net/fix.php?id=70078&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=70078&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=70078&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=70078&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70078&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=70078&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=70078&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=70078&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70078&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=70078&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=70078&r=mysqlcfg
Thread (16 messages)
- mplomer at gmx dot de
- cmb@php.netBug #70078 [Opn->Ver]: Memleak when calling PHP functions from XSL with nodes as parameter
- mplomer at gmx dot deBug #70078 [Com]: Memleak when calling PHP functions from XSL with nodes as parameter
- mike@php.netBug #70078 [Ver]: Memleak when calling PHP functions from XSL with nodes as parameter
- mplomer at gmx dot deBug #70078 [Com]: Memleak when calling PHP functions from XSL with nodes as parameter
- cmb@php.netBug #70078 [Ver]: Memleak when calling PHP functions from XSL with nodes as parameter
- mplomer at gmx dot deBug #70078 [Com]: Memleak when calling PHP functions from XSL with nodes as parameter
- mike@php.netBug #70078 [Ver]: Memleak when calling PHP functions from XSL with nodes as parameter
- kalle@php.netBug #70078 [Ver->Asn]: Memleak when calling PHP functions from XSL with nodes as parameter
- kalle@php.netBug #70078 [Asn->Opn]: Memleak when calling PHP functions from XSL with nodes as parameter
- not-implemented at mark-plomer dot deBug #70078 [Opn]: Memleak when calling PHP functions from XSL with nodes as parameter
- cmb@php.netBug #70078 [PATCH]: Memleak when calling PHP functions from XSL with nodes as parameter
- cmb@php.netBug #70078 [Opn->Csd]: Memleak when calling PHP functions from XSL with nodes as parameter
- cmb@php.netBug #70078 [Csd]: Memleak when calling PHP functions from XSL with nodes as parameter
- not-implemented at mark-plomer dot deBug #70078 [Com]: Memleak when calling PHP functions from XSL with nodes as parameter
- cmb@php.netBug #70078 [Csd]: Memleak when calling PHP functions from XSL with nodes as parameter