#40565 [NEW]: segmentation fault

From: Date: Tue, 20 Feb 2007 19:03:57 +0000
Subject: #40565 [NEW]: segmentation fault
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-109210@lists.php.net to get a copy of this message
From: ThomasxHolder at compuserve dot de Operating system: Solaris 9 PHP version: 5.2.1 PHP Bug Type: Reproducible crash Bug description: segmentation fault Description: ------------ We are running php-5.1.6 on solaris 5.9 (sparc64). Since php-5.2.0 all attemts to update failed. A simple echo test works, but almost everything else causes segmentation fault. "make test" stops in the very beginning with "make: [test] Error 139 (ignored)". Reproduce code: --------------- $ cat test.php <?php echo str_replace("foo", "bar", "foofoo\n"); ?> $ gdb ../sapi/cli/php GNU gdb 6.3 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "sparc-sun-solaris2.8"... (gdb) set args test.php (gdb) run Starting program: /tmp/holder/php-5.2.1/sapi/cli/php test.php *zval_ptr is null... Program received signal SIGSEGV, Segmentation fault. _zval_ptr_dtor (zval_ptr=0xffbfe634) at /tmp/holder/php-5.2.1/Zend/zend_execute_API.c:416 416 (*zval_ptr)->refcount--; (gdb) backtrace #0 _zval_ptr_dtor (zval_ptr=0xffbfe634) at /tmp/holder/php-5.2.1/Zend/zend_execute_API.c:416 #1 0x00189b3c in zend_do_fcall_common_helper_SPEC (execute_data=0xffbfe6c8) at zend_execute.h:155 #2 0x00187c40 in execute (op_array=0x2d7da8) at zend_vm_execute.h:92 #3 0x0016c390 in zend_execute_scripts (type=8, retval=Variable "retval" is not available. ) at /tmp/holder/php-5.2.1/Zend/zend.c:1135 #4 0x0012d330 in php_execute_script (primary_file=0xffbfedf0) at /tmp/holder/php-5.2.1/main/main.c:1784 #5 0x001ff870 in main (argc=2, argv=0xffbfee9c) at /tmp/holder/php-5.2.1/sapi/cli/php_cli.c:1114 (gdb) quit I inserted if ((*zval_ptr) == NULL) { printf("*zval_ptr is null...\n"); } into Zend/zend_execute_API.c, for that the error occurs in line 416 and not in line 412 Actual result: -------------- Segmentation fault -- Edit bug report at http://bugs.php.net/?id=40565&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40565&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40565&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40565&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40565&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40565&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40565&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40565&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40565&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40565&r=support Expected behavior: http://bugs.php.net/fix.php?id=40565&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40565&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40565&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40565&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40565&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40565&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40565&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40565&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40565&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40565&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40565&r=mysqlcfg

« previous php.bugs (#109210) next »