|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-10-08 19:24 UTC] hoffie at gentoo dot org
Description: ------------ >=php-5.2.0 seems to be totally broken on the ia64 architecture: Even when compiling with very minimal features PHP simply segfaults when doing basic operations involving constants, e.g. using define() or defined(). As soon as debugging symbols are enabled (CFLAGS=-g or ./configure --enable-debug) the problem disappears, that's why I'm unable to provide a useful backtrace. As the problem first appeared in 5.2.0 it might be related to the memory manager changes? The patch mentioned in bug 42317 makes this problem disappear as well, but as one of you already noted in the other bug it's probably not a real solution. Reproduce code: --------------- i2 php5.2-200710081630 # ./configure --disable-all --disable-cgi --enable-cli && make [...] i2 php5.2-200710081630 # ./sapi/cli/php -r 'var_dump(defined("foo"));' Versions of related libs/tools: automake-1.10, autoconf-2.13, libtool-1.5.24, bison-2.3, flex-2.5.4, gcc-4.1.2, glibc-2.5, binutils-2.17 This is on a fresh Gentoo system, but when compiling on Debian Etch the same problems appear, so I don't think it's related to distribution-specific patches to toolchain parts like binutils/gcc. Expected result: ---------------- bool(false) Actual result: -------------- Segmentation fault (gdb) run -r 'var_dump(defined("foo"));' Starting program: /tmp/php5.2-200710081630/sapi/cli/php -r 'var_dump(defined("foo"));' Program received signal SIGSEGV, Segmentation fault. _zval_ptr_dtor (zval_ptr=0x60000fffff91ebd0) at /tmp/php5.2-200710081630/Zend/zend_execute_API.c:412 412 (*zval_ptr)->refcount--; (gdb) bt #0 _zval_ptr_dtor (zval_ptr=0x60000fffff91ebd0) at /tmp/php5.2-200710081630/Zend/zend_execute_API.c:412 #1 0x4000000000298860 in zend_do_fcall_common_helper_SPEC (execute_data=0x60000fffff91ec50) at /tmp/php5.2-200710081630/Zend/zend_execute.h:155 ia64-tdep.c:1591: internal-error: ia64_frame_prev_register: Assertion `regnum >= 0' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 05:00:01 2025 UTC |
Just to be sure you're not loading any php.ini files, try this: (gdb) run -n -r 'var_dump(defined("foo"));' And you could also try to see what valgrind has to say about it: # USE_ZEND_ALLOC=0 valgrind --leak-check=yes php -n -r 'var_dump(defined("foo"));'> Just to be sure you're not loading any php.ini files, try this: > (gdb) run -n -r 'var_dump(defined("foo"));' Fails with the same symptoms. > And you could also try to see what valgrind has to say about it: > # USE_ZEND_ALLOC=0 valgrind --leak-check=yes php -n -r > 'var_dump(defined("foo"));' If you gave me valgrind for ia64 I'd happily do that. ;) > checking for a supported CPU... no (ia64) > configure: error: Unsupported host architecture. SorryYes, I admit that above gdb output shows some strangeness, but well -- that's a gdb problem, not generally software being broken on that system. Upgrading gdb resolved that problem and here goes the new backtrace (using 5.2.5RC2 now): (gdb) r -n -r 'var_dump(defined("foo"));' Starting program: /tmp/php-5.2.5RC2/sapi/cli/php -n -r 'var_dump(defined("foo"));' Program received signal SIGSEGV, Segmentation fault. _zval_ptr_dtor (zval_ptr=0x60000ffffff3ebd0) at /tmp/php-5.2.5RC2/Zend/zend_execute_API.c:412 412 (*zval_ptr)->refcount--; (gdb) bt #0 _zval_ptr_dtor (zval_ptr=0x60000ffffff3ebd0) at /tmp/php-5.2.5RC2/Zend/zend_execute_API.c:412 #1 0x4000000000298a80 in zend_do_fcall_common_helper_SPEC ( execute_data=0x60000ffffff3ec50) at /tmp/php-5.2.5RC2/Zend/zend_execute.h:155 #2 0x4000000000297200 in execute (op_array=0x60000000000c86e0) at /tmp/php-5.2.5RC2/Zend/zend_vm_execute.h:92 #3 0x4000000000228800 in zend_eval_string (str=<value optimized out>, retval_ptr=0x0, string_name=0x400000000041fd10 "Command line code") at /tmp/php-5.2.5RC2/Zend/zend_execute_API.c:1171 #4 0x4000000000228c10 in zend_eval_string_ex ( str=0x60000ffffff3f740 "var_dump(defined(\"foo\"));", retval_ptr=0x0, string_name=0x400000000041fd10 "Command line code", handle_exceptions=1) at /tmp/php-5.2.5RC2/Zend/zend_execute_API.c:1205 #5 0x40000000003a2130 in main (argc=Cannot access memory at address 0x10 ) at /tmp/php-5.2.5RC2/sapi/cli/php_cli.c:1179Same issue with: * Sun UltraSparc * php-5.2.8 * gcc 4.3 (debian stable, lenny) * default CFLAGS (gdb) run -n -r 'var_dump(defined("foo"));' Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xf7fcc6b0 (LWP 29465)] 0x002ceb88 in _zval_ptr_dtor (zval_ptr=0xffee16f4) at /tmp/src/php- 5.2.8/Zend/zend_execute_API.c:412 412 (*zval_ptr)->refcount--;