From: hoffie at gentoo dot org
Operating system: Linux on ia64
PHP version: 5CVS-2007-10-08 (snap)
PHP Bug Type: Reproducible crash
Bug description: php segfaults on ia64 when working w/ constants
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 bug report at http://bugs.php.net/?id=42893&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=42893&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=42893&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=42893&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42893&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=42893&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=42893&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=42893&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=42893&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=42893&r=support
Expected behavior: http://bugs.php.net/fix.php?id=42893&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=42893&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=42893&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42893&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42893&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42893&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=42893&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=42893&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=42893&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=42893&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=42893&r=mysqlcfg