Bug #54434 [Opn->Csd]: 'use()' array reference crashes PHP - zend_hash.c

From: Date: Sun, 05 Jun 2011 18:23:19 +0000
Subject: Bug #54434 [Opn->Csd]: 'use()' array reference crashes PHP - zend_hash.c
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-161197@lists.php.net to get a copy of this message
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)

« previous php.bugs (#161197) next »