php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29108 xslt segfaults when ze1_compatibility_mode is on
Submitted: 2004-07-12 12:37 UTC Modified: 2005-03-06 22:08 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: tony2001 at phpclub dot net Assigned:
Status: Closed Package: XSLT related
PHP Version: 5CVS-2004-07-12 (dev) OS: Linux 2.4.23
Private report: No CVE-ID: None
 [2004-07-12 12:37 UTC] tony2001 at phpclub dot net
Description:
------------
XSLT segfaults when trying to execute rather simple script and zend.ze1_compatibility_mode is On.
Turning zend.ze1_compatibility_mode = Off it works ok.

Reproduce code:
---------------
<?
$xslt = new xsltProcessor;

$document = new DomDocument();
$document->preserveWhiteSpace = false;
$f=$document->load('test.xslt');
$xslt->importStyleSheet($document);

?>

Expected result:
----------------
Found a top-level element xslutput with null namespace URI

Actual result:
--------------
Program received signal SIGSEGV, Segmentation fault.
0x081ec1d2 in zif_xsl_xsltprocessor_import_stylesheet (ht=1, return_value=0x83a69dc, this_ptr=0x83b8eec,
    return_value_used=0) at /home/tony/CVS/php-src/ext/xsl/xsltprocessor.c:369
369                     if (((xsltStylesheetPtr) intern->ptr)->_private != NULL) {
(gdb) bt
#0  0x081ec1d2 in zif_xsl_xsltprocessor_import_stylesheet (ht=1, return_value=0x83a69dc, this_ptr=0x83b8eec,
    return_value_used=0) at /home/tony/CVS/php-src/ext/xsl/xsltprocessor.c:369
#1  0x0826a938 in zend_do_fcall_common_helper (execute_data=0xbfffd3b0, opline=0x83b8dd4, op_array=0x83b4374)
    at /home/tony/CVS/php-src/Zend/zend_execute.c:2699
#2  0x0826b014 in zend_do_fcall_by_name_handler (execute_data=0xbfffd3b0, opline=0x83b8dd4, op_array=0x83b4374)
    at /home/tony/CVS/php-src/Zend/zend_execute.c:2810
#3  0x08266a02 in execute (op_array=0x83b4374) at /home/tony/CVS/php-src/Zend/zend_execute.c:1391
#4  0x0823f417 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/tony/CVS/php-src/Zend/zend.c:1061
#5  0x081f1d81 in php_execute_script (primary_file=0xbffff7f0) at /home/tony/CVS/php-src/main/main.c:1627
#6  0x082750ca in main (argc=3, argv=0xbffff884) at /home/tony/CVS/php-src/sapi/cli/php_cli.c:943
#7  0x40cc6af7 in __libc_start_main () from /lib/i686/libc.so.6


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-12 14:52 UTC] chregu@php.net
Could you try the patch at 
http://trash.chregu.tv/php_xsl.c.diff.txt
and see if it helps
(patch by Rob)
 [2004-07-12 14:58 UTC] tony2001 at phpclub dot net
Yep, this patch fixes the problem.
At least it doesn't segfault anymore.
 [2005-03-06 22:08 UTC] sniper@php.net
Seems to be fixed in CVS (does not crash for me)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 12:01:28 2024 UTC