#42893 [Fbk->Opn]: segfault on ia64 when working w/ constants

From: Date: Sat, 13 Oct 2007 10:13:42 +0000
Subject: #42893 [Fbk->Opn]: segfault on ia64 when working w/ constants
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-118502@lists.php.net to get a copy of this message
ID: 42893 User updated by: hoffie at gentoo dot org Reported By: hoffie at gentoo dot org -Status: Feedback +Status: Open Bug Type: Reproducible crash Operating System: Linux on ia64 PHP Version: 5CVS-2007-10-08 (snap) New Comment: > 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. Sorry Previous Comments: ------------------------------------------------------------------------ [2007-10-11 13:46:28] jani@php.net 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"));' ------------------------------------------------------------------------ [2007-10-08 19:24:35] 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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42893&edit=1

« previous php.bugs (#118502) next »