Bug #62931 [Asn->Csd]: Crash on foreach when using list() => $var
| From: | laruence@php.net | Date: | Sun, 26 Aug 2012 04:03:13 +0000 |
| Subject: | Bug #62931 [Asn->Csd]: Crash on foreach when using list() => $var | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-172911@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62931&edit=1
ID: 62931
Updated by: laruence@php.net
Reported by: felipe@php.net
Summary: Crash on foreach when using list() => $var
-Status: Assigned
+Status: Closed
Type: Bug
Package: Scripting Engine problem
PHP Version: master-Git-2012-08-25 (Git)
Assigned To: laruence
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2012-08-26 04:03:11] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7c60aeef857f288661a6f95cf3aa45d6a6feff9b
Log: Fixed bug #62931 & #62932
------------------------------------------------------------------------
[2012-08-25 21:22:28] felipe@php.net
Description:
------------
I wonder that such syntax is not even supposed to be allowed.
See below.
Test script:
---------------
<?php
foreach ([] as list() => $x) {
}
Actual result:
--------------
Program received signal SIGSEGV, Segmentation fault.
0x000000000083af12 in zend_do_end_variable_parse (variable=0x7fffffff8880, type=1, arg_offset=0,
tsrm_ls=0x1058090) at /home/felipe/dev/php-src/Zend/zend_compile.c:1303
1303 le = fetch_list_ptr->head;
(gdb) p fetch_list_ptr
$1 = (zend_llist *) 0x0
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62931&edit=1