From: pavlomt at hotmail dot com
Operating system: SLES9 (x86_64)
PHP version: 4.4.0
PHP Bug Type: DOM XML related
Bug description: segfault on dump_mem
Description:
------------
php compiled on 32 bit x86, running as appache2 module
(apache2-2.0.49-27.8 from SLES9-32bit)
'./configure' '--host=i686-suse-linux' '--build=i686-suse-linux'
'--target=i586-suse-linux' '--program-prefix=' '--prefix=/usr'
'--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin'
'--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include'
'--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--with-apxs2=/usr/sbin/apxs2-prefork'
'--disable-debug' '--with-config-file-path=/etc' '--with-zlib-dir=/usr'
'--with-xml=shared' '--with-expat-dir=/usr' '--enable-inline-optimization'
'--enable-memory-limit' '--enable-magic-quotes' '--enable-safe-mode'
'--enable-sigchild' '--disable-ctype' '--enable-session'
'--with-informix=/opt/ICSDK' '--with-mysql=shared' '--with-bz2=shared'
'--with-zlib' '--with-pear' '--with-dom' '--with-dom-xslt'
'--with-dom-exslt'
Reproduce code:
---------------
$this->r_result = $this->r_xsl->process($this->r_xml, $array);
// $this->r_xml->dump_mem(1); //- no segfault !!!
echo $this->r_xsl->result_dump_mem( $this->r_result); //segfault
// echo $this->r_result->dump_mem(0); //segfault
segfaults not depends on 0/1 parameter to dump_mem.
dynamically bulded xml-result of multiple database selects
more than 20 lines
Actual result:
--------------
rogram received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1434784864 (LWP 5835)]
0x5579e226 in free () from /lib/tls/libc.so.6
(gdb) backtrace
#0 0x5579e226 in free () from /lib/tls/libc.so.6
#1 0x55cd1cfb in xsltFreeKeys () from /usr/lib/libxslt.so.1
#2 0x55cc4f8a in xsltFreeStylesheet () from /usr/lib/libxslt.so.1
#3 0x55a7006c in php_free_xslt_stylesheet (rsrc=0x846bc74)
at /usr/src/packages/BUILD/php-4.4.0/ext/domxml/php_domxml.c:834
#4 0x55b21223 in list_entry_destructor (ptr=0x846bc74)
at /usr/src/packages/BUILD/php-4.4.0/Zend/zend_list.c:177
#5 0x55b1ede8 in zend_hash_apply_deleter (ht=0x55b816a0, p=0x8433c0c)
at /usr/src/packages/BUILD/php-4.4.0/Zend/zend_hash.c:611
#6 0x55b1ef47 in zend_hash_graceful_reverse_destroy (ht=0x55b816a0)
at /usr/src/packages/BUILD/php-4.4.0/Zend/zend_hash.c:677
#7 0x55b14704 in shutdown_executor () at
/usr/src/packages/BUILD/php-4.4.0/Zend/zend_execute_API.c:211
#8 0x55b1abe4 in zend_deactivate () at
/usr/src/packages/BUILD/php-4.4.0/Zend/zend.c:693
#9 0x55aefcbe in php_request_shutdown (dummy=0x0) at
/usr/src/packages/BUILD/php-4.4.0/main/main.c:997
#10 0x55b2e285 in php_handler (r=0x820a458)
at
/usr/src/packages/BUILD/php-4.4.0/sapi/apache2handler/sapi_apache2.c:443
#11 0x08069288 in ap_run_handler ()
#12 0x0806c8a7 in ap_invoke_handler ()
#13 0x0806688c in ap_internal_redirect ()
#14 0x559f1df3 in handler_redirect () from
/usr/lib/apache2-prefork/mod_rewrite.so
#15 0x08069288 in ap_run_handler ()
#16 0x0806c8a7 in ap_invoke_handler ()
#17 0x080669fb in ap_process_request ()
#18 0x08061168 in ap_process_http_connection ()
#19 0x080746b8 in ap_run_process_connection ()
#20 0x080747f0 in ap_process_connection ()
#21 0x08067ea5 in child_main ()
#22 0x080680fc in make_child ()
#23 0x08068b85 in ap_mpm_run ()
#24 0x0806f627 in main ()
(gdb)
--
Edit bug report at http://bugs.php.net/?id=33697&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33697&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=33697&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=33697&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33697&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33697&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33697&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33697&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33697&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33697&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33697&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=33697&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=33697&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33697&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33697&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33697&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33697&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33697&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33697&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33697&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33697&r=mysqlcfg