#39297 [NEW]: Bus Error during shutdown
| From: | jeff at procata dot com | Date: | Sun, 29 Oct 2006 13:50:03 +0000 |
| Subject: | #39297 [NEW]: Bus Error during shutdown | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-104133@lists.php.net to get a copy of this message | ||
From: jeff at procata dot com
Operating system: Mac OS X 10.3.9
PHP version: 5.1.6
PHP Bug Type: Reproducible crash
Bug description: Bus Error during shutdown
Description:
------------
I'm getting a reproducable Bus Error / Segfault with PHP
CLI. The same occurs in 5.1.2, 5.1.6 and 5.2.0rc4.
The error is reproducible, but difficult to isolate into
a small example.
Reproduce code:
---------------
The code that triggers the segfault is similiar to
ByRef($this->obj['test'], $this->obj);
Where
function byRef(&$first, &$second)
and obj implements ArrayAccess with a method
public function offsetGet($offset) {
$cannonicalName = strtolower($offset);
return $this->children[$cannonicalName];
}
Expected result:
----------------
PHP Fatal error: Objects used as arrays in post/pre
increment/decrement must return values by reference
Actual result:
--------------
Program received signal EXC_BAD_ACCESS, Could not access
memory.
_zend_is_inconsistent (ht=0xffffffff, file=0x1 <Address
0x1 out of bounds>, line=112) at /Users/jeff/Downloads/
php-5.1.6/Zend/zend_hash.c:53
53 if (ht->inconsistent==HT_OK) {
(gdb) bt
#0 _zend_is_inconsistent (ht=0xffffffff, file=0x1
<Address 0x1 out of bounds>, line=112) at /Users/jeff/
Downloads/php-5.1.6/Zend/zend_hash.c:53
#1 0x001b7f68 in zend_hash_destroy (ht=0xffffffff) at /
Users/jeff/Downloads/php-5.1.6/Zend/zend_hash.c:512
#2 0x001c7130 in zend_object_std_dtor
(object=0x2134c98) at /Users/jeff/Downloads/php-5.1.6/
Zend/zend_objects.c:40
#3 0x001c73c8 in zend_objects_free_object_storage
(object=0x2134c98) at /Users/jeff/Downloads/php-5.1.6/
Zend/zend_objects.c:111
#4 0x001ca5d8 in zend_objects_store_free_object_storage
(objects=0xffffffff) at /Users/jeff/Downloads/php-5.1.6/
Zend/zend_objects_API.c:86
#5 0x0019fa74 in shutdown_executor () at /Users/jeff/
Downloads/php-5.1.6/Zend/zend_execute_API.c:281
#6 0x001add74 in zend_deactivate () at /Users/jeff/
Downloads/php-5.1.6/Zend/zend.c:854
#7 0x00169c5c in php_request_shutdown
(dummy=0xffffffff) at /Users/jeff/Downloads/php-5.1.6/
main/main.c:1292
#8 0x00232284 in main (argc=4, argv=0xbffffde0) at /
Users/jeff/Downloads/php-5.1.6/sapi/cli/php_cli.c:1246
--
Edit bug report at http://bugs.php.net/?id=39297&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39297&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39297&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39297&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39297&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=39297&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39297&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39297&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39297&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39297&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39297&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=39297&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=39297&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39297&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39297&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39297&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39297&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39297&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39297&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39297&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39297&r=mysqlcfg