ID: 39418 Updated by: [EMAIL PROTECTED] Reported By: php at fiddaman dot net -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: Solaris 10 PHP Version: 5.2.0 New Comment:
Please try the following patch: http://bb.prohost.org/patch/trim.txt Previous Comments: ------------------------------------------------------------------------ [2006-11-08 21:29:34] php at fiddaman dot net Changing summary to include ltrim() ------------------------------------------------------------------------ [2006-11-08 21:28:25] php at fiddaman dot net Ok, --disable-all reminded me that I had an auto-included header on that web site so the test code wasn't as simple as I thought. Sorry for the confusion. I've narrowed down the code which is causing the crash to: ltrim('/test.php', '/'); and it still crashes with --disable-all % gcc -v Using built-in specs. Target: sparcv9-sun-solaris2.9 Configured with: /data/src/build/gcc-4.1.1/configure --prefix=/opt/GNUgcc --enable-languages=c,c++ --disable-nls sparcv9-sun-solaris2.9 Thread model: posix gcc version 4.1.1 ------------------------------------------------------------------------ [2006-11-08 15:54:49] [EMAIL PROTECTED] I don't have access to Solaris 10/64bit, but I can't reproduce the problem on any other OS I can find around here (Linux, FreeBSD, MacOS, AIX). Please try to build it with --disable-all and see if it changes anything. What compiler do you use, btw? ------------------------------------------------------------------------ [2006-11-07 23:41:38] php at fiddaman dot net Same result with latest 5.2 CVS #0 _zval_ptr_dtor (zval_ptr=0xffffffff7fffd260) at /data/src/build/php5.2-200611072130/Zend/zend_execute_API.c:412 412 (*zval_ptr)->refcount--; ------------------------------------------------------------------------ [2006-11-07 23:22:16] php at fiddaman dot net Description: ------------ I've compiled PHP 5.2.0 as a replacement for 5.1.6 which is running fine here. 5.2.0 crashes with any PHP web page. This is Solaris 10, 64-bit. I've recompiled without any extensions, same result. ./configure \ --prefix=$DIR \ --with-exec-dir=$DIR/bin \ --with-apxs2=/opt/apache/bin/apxs \ --disable-libgcc \ --disable-libxml \ --disable-dom \ --disable-simplexml \ --disable-xml \ --disable-xmlreader \ --disable-xmlwriter \ --without-pear Not sure how to debug this further. Reproduce code: --------------- <?php print "test"; ?> Expected result: ---------------- test Actual result: -------------- Program terminated with signal 11, Segmentation fault. #0 _zval_ptr_dtor (zval_ptr=0xffffffff7fffd1a0) at /data/src/build/php-5.2.0/Zend/zend_execute_API.c:412 412 (*zval_ptr)->refcount--; (gdb) where #0 _zval_ptr_dtor (zval_ptr=0xffffffff7fffd1a0) at /data/src/build/php-5.2.0/Zend/zend_execute_API.c:412 #1 0xffffffff78abd1c8 in zend_do_fcall_common_helper_SPEC ( execute_data=0xffffffff7fffd438) at /data/src/build/php-5.2.0/Zend/zend_execute.h:149 #2 0xffffffff78aac2dc in execute (op_array=0xffffffff7fffe660) at /data/src/build/php-5.2.0/Zend/zend_vm_execute.h:92 #3 0xffffffff78a8e1a8 in zend_execute_scripts (type=5034360, retval=<value optimized out>, file_count=2024194208) at /data/src/build/php-5.2.0/Zend/zend.c:1097 #4 0xffffffff78a49fc4 in php_execute_script (primary_file=0x0) at /data/src/build/php-5.2.0/main/main.c:1758 #5 0xffffffff78b18d98 in php_handler (r=0x0) at /data/src/build/php-5.2.0/sapi/apache2handler/sapi_apache2.c:592 #6 0x0000000100049e00 in ap_run_handler () #7 0x000000010004abf0 in ap_invoke_handler () #8 0x00000001000a6314 in ap_process_request () #9 0x00000001000a1158 in ap_process_http_connection () #10 0x0000000100056710 in ap_run_process_connection () #11 0x0000000100056d8c in ap_process_connection () #12 0x00000001000d9358 in child_main () #13 0x00000001000d9674 in make_child () #14 0x00000001000d9b68 in perform_idle_server_maintenance () #15 0x00000001000da5ac in ap_mpm_run () #16 0x0000000100024c28 in main () ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39418&edit=1