From: jason at jasonjustman dot com
Operating system: solars 10
PHP version: 5CVS-2005-10-03 (snap)
PHP Bug Type: Reproducible crash
Bug description: zend.ze1_compatibility_mode = on segfault
Description:
------------
segfault in solaris 10, using php-5.0.6-dev - php5-STABLE-200510030637
Program received signal SIGSEGV, Segmentation fault.
0xff019b38 in zend_objects_clone_obj (zobject=0xff3fffd8) at
/export/apache/php5-STABLE-200510030637/Zend/zend_objects.c:181
181 new_obj_val = zend_objects_new(&new_object, old_object->ce
TSRMLS_CC);
(gdb) backtrace
#0 0xff019b38 in zend_objects_clone_obj (zobject=0xff3fffd8) at
/export/apache/php5-STABLE-200510030637/Zend/zend_objects.c:181
#1 0xff019970 in zval_add_ref_or_clone (p=0x0) at
/export/apache/php5-STABLE-200510030637/Zend/zend_objects.c:127
Reproduce code:
---------------
can't exactly pin down reproduceable code, but it seems to be something
similar to the following:
class aggrevator {
function aggrevator(&$obj) {
$this->obj = &$obj;
$this->_call();
}
function _call()
{
$this->obj->callback();
}
}
class helper {
function helper(&$obj)
{
$this->obj_ref = &$obj;
}
}
class parent { }
class child extends parent {
function callback() {
$this->_helper = new helper($this);
}
}
$c = new child;
$h = new helper($c);
Expected result:
----------------
not to crash...
Actual result:
--------------
f'd in the a, segfault
--
Edit bug report at http://bugs.php.net/?id=34712&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34712&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=34712&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=34712&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34712&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34712&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34712&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34712&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34712&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34712&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34712&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=34712&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=34712&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34712&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34712&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34712&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34712&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34712&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34712&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34712&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34712&r=mysqlcfg