From:
Operating system: Linux/Ubuntu
PHP version: 5.3SVN-2011-03-31 (snap)
Package: Arrays related
Bug Type: Bug
Bug description:'use()' array reference crashes PHP - zend_hash.c
Description:
------------
This problem doesn't occur to 5.3.3 (my usual development environment) but
the latest stable and snaps, tested on both 32-bit and 64-bit machine
(Ubuntu Hardy and Lenny)
$ ~/opt/bin/php -v
PHP 5.3.6 (cli) (built: Mar 31 2011 16:04:07) (DEBUG)
$ ../opt/bin/php -v
PHP 5.3.7-dev (cli) (built: Apr 1 2011 00:15:05) (DEBUG)
The program will exit with return code 0 - which is the annoying part.
Test script:
---------------
<?php
function m(&$a){
$b = &$a;
call_user_func(function() use($b){});
}
function n($a){
call_user_func(function() use($a){});
}
$a = array('a');
n($a);
m($a);
exit;
Expected result:
----------------
[Thread debugging using libthread_db enabled]
/home/yclian/Development/src/php5.3-201103311430/Zend/zend_hash.c(520) :
ht=0x8924f6c is inconsistent
Program exited normally.
(gdb) quit
Actual result:
--------------
Do not fail.
--
Edit bug report at http://bugs.php.net/bug.php?id=54434&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=54434&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=54434&r=trysnapshot53
Try a snapshot (trunk):
http://bugs.php.net/fix.php?id=54434&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=54434&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=54434&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=54434&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=54434&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=54434&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=54434&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=54434&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=54434&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=54434&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=54434&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=54434&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54434&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=54434&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=54434&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=54434&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=54434&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=54434&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=54434&r=mysqlcfg