Edit report at http://bugs.php.net/bug.php?id=54434&edit=1

 ID:                 54434
 User updated by:    foss+php at yclian dot com
 Reported by:        foss+php at yclian dot com
 Summary:            'use()' array reference crashes PHP - zend_hash.c
 Status:             Open
 Type:               Bug
 Package:            Arrays related
 Operating System:   Linux/Ubuntu
 PHP Version:        5.3SVN-2011-03-31 (snap)
 Block user comment: N
 Private report:     N

 New Comment:

Apparently I made a mistake on the 'expected result' vs. 'actual
result'. Sorry about it.


Previous Comments:
------------------------------------------------------------------------
[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

Reply via email to