Bug #49634 [Com]: Segfault throwing an exception in a XSL registered function
Edit report at https://bugs.php.net/bug.php?id=49634&edit=1
ID: 49634
Comment by: dmitry dot koterov at gmail dot com
Reported by: aldo at armiento dot com
Summary: Segfault throwing an exception in a XSL registered
function
Status: Closed
Type: Bug
Package: XSLT related
Operating System: Linux Debian, Mac OSX
PHP Version: 5.*
Assigned To: mike
Block user comment: N
Private report: N
New Comment:
Seems to me, this fix reduces the performance greatly. Let's review your fix again:
https://github.com/php/php-src/commit/6408a1a59e6d371cd488687e28e18815ea97984e#diff-258cc1cabc37df15d7f0ed40924f64efL281
Note that xmlDocCopyNodeList() does "a recursive copy of the node list": http://xmlsoft.org/html/libxml-tree.html#xmlDocCopyNodeList
E.g. if I have a 10MB XML document and call
<xsl:value-of select="php:function('someFunction', /, 'abc')" />
in an XSLT, the whole 10M XML document will be copied before calling someFunction(). It hasn't
been copied in PHP 5.3, so we have a significant performance penalty here.
Is there another way to achieve the same behavior with no libxml2 node cloning?
Previous Comments:
------------------------------------------------------------------------
[2014-10-07 23:27:38] stas@php.net
Automatic comment on behalf of mike
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=6408a1a59e6d371cd488687e28e18815ea97984e
Log: fix bug #49634x
------------------------------------------------------------------------
[2014-10-07 23:16:31] stas@php.net
Automatic comment on behalf of mike
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=6408a1a59e6d371cd488687e28e18815ea97984e
Log: fix bug #49634x
------------------------------------------------------------------------
[2013-12-02 16:51:36] ab@php.net
Automatic comment on behalf of mike
Revision: http://git.php.net/?p=php-src.git;a=commit;h=6408a1a59e6d371cd488687e28e18815ea97984e
Log: fix bug #49634x
------------------------------------------------------------------------
[2013-12-02 11:21:24] mike@php.net
Automatic comment on behalf of mike
Revision: http://git.php.net/?p=php-src.git;a=commit;h=6408a1a59e6d371cd488687e28e18815ea97984e
Log: fix bug #49634x
------------------------------------------------------------------------
[2010-06-22 00:19:57] felipe@php.net
Interesting, it cannot be reproduced on trunk.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=49634
--
Edit this bug report at https://bugs.php.net/bug.php?id=49634&edit=1
Thread (14 messages)
- aldo at armiento dot com
- felipe@php.net#49634 [Opn]: Segfault throwing an exception in a XSL registered function
- jani@php.net#49634 [Opn->Fbk]: Segfault throwing an exception in a XSL registered function
- aldo at armiento dot com#49634 [Com]: Segfault throwing an exception in a XSL registered function
- aldo at armiento dot com#49634 [Com]: Segfault throwing an exception in a XSL registered function
- aldo at armiento dot com#49634 [Fbk->Opn]: Segfault throwing an exception in a XSL registered function
- jani@php.net#49634 [Opn]: Segfault throwing an exception in a XSL registered function
- aldo at armiento dot com#49634 [Opn]: Segfault throwing an exception in a XSL registered function
- felipe@php.netBug #49634 [Opn]: Segfault throwing an exception in a XSL registered function
- felipe@php.netBug #49634 [Opn]: Segfault throwing an exception in a XSL registered function
- mike@php.netBug #49634 [Opn->Csd]: Segfault throwing an exception in a XSL registered function
- dmitry dot koterov at gmail dot comBug #49634 [Com]: Segfault throwing an exception in a XSL registered function
- mplomer at gmx dot deBug #49634 [Com]: Segfault throwing an exception in a XSL registered function
- mplomer at gmx dot deBug #49634 [Com]: Segfault throwing an exception in a XSL registered function