|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-08-08 18:59 UTC] chregu@php.net
[2004-08-08 20:09 UTC] chregu@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 04:00:02 2025 UTC |
Description: ------------ Child httpd process segfault, when php function(called from XSLT template) throw exception, and when exception was throwed from steream wrapper, used in XSLT template. PHP Version 5.1.0-dev, configure with: './configure' '--prefix=/usr/' '--with-apxs2' '--with-gettext' '--with-iconv' '--with-mysql' '--enable-mbstring=ru' '--enable-mbregex' '--enable-mbstr-enc-trans' '--disable-short-tags' '--with-xsl' '--with-libxml' '--without-sqlite' '--enable-soap' libxslt Version 1.1.8 libxml Version 2.6.11 libexslt Version 1.1.8 apache 2.0.48 Reproduce code: --------------- <?php try { function throwFunction() { throw new Exception('exception messaage'); } $xsl = new DomDocument(); $xsl->loadXML( '<?xml version="1.0" encoding="iso-8859-1" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:php="http://php.net/xsl"> <xsl:template match="/"> <xsl:value-of select="php:function(\'throwFunction\')" /> </xsl:template> </xsl:stylesheet>' ); $xml = new DomDocument; $xml->loadXML( '<?xml version="1.0" encoding="iso-8859-1" ?> <null></null>' ); $proc = new XSLTProcessor(); $proc->registerPhpFunctions(); $proc->importStylesheet($xsl); $dom = $proc->transformToDoc($xml); } catch(Exception $exception) { echo $exception; } ?> Expected result: ---------------- exception 'Exception' with message 'exception messaage' in /mnt/data/www/html/web/test.php:4 Stack trace: #0 /mnt/data/www/html/web/test.php(27): XSLTProcessor->throwFunction() #1 /mnt/data/www/html/web/test.php(27): XSLTProcessor->transformToDoc(Object(DOMDocument)) #2 {main} Actual result: -------------- from apache error log: [Sun Aug 08 18:55:33 2004] [notice] child pid 1337 exit signal Segmentation fault (11)