Bug #54434 [Opn->Csd]: 'use()' array reference crashes PHP - zend_hash.c
Edit report at http://bugs.php.net/bug.php?id=54434&edit=1
ID: 54434
Updated by: felipe@php.net
Reported by: foss+php at yclian dot com
Summary: 'use()' array reference crashes PHP - zend_hash.c
-Status: Open
+Status: Closed
Type: Bug
Package: Scripting Engine problem
Operating System: Linux/Ubuntu
PHP Version: 5.3SVN-2011-03-31 (snap)
-Assigned To:
+Assigned To: felipe
Block user comment: N
Private report: N
New Comment:
This issue looks already fixed (probably by fixing #54358).
Previous Comments:
------------------------------------------------------------------------
[2011-03-31 20:26:32] foss+php at yclian dot com
Apparently I made a mistake on the 'expected result' vs. 'actual result'. Sorry
about it.
------------------------------------------------------------------------
[2011-03-31 18:31:41] foss+php at yclian dot com
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 this bug report at http://bugs.php.net/bug.php?id=54434&edit=1
Thread (3 messages)