Edit report at https://bugs.php.net/bug.php?id=60169&edit=1
ID: 60169
Patch added by: laruence@php.net
Reported by: thekid@php.net
Summary: Conjunction of ternary and list crashes PHP
Status: Assigned
Type: Bug
Package: Scripting Engine problem
Operating System: Windows Vista
PHP Version: 5.4.0beta2
Assigned To: lbarnaud
Block user comment: N
Private report: N
New Comment:
The following patch has been added/updated:
Patch Name: invalid.patch
Revision: 1320031445
URL: https://bugs.php.net/patch-display.php?bug=60169&patch=invalid.patch&revision=1320031445
Previous Comments:
------------------------------------------------------------------------
[2011-10-31 03:21:58] laruence@php.net
there is also segfault in (***)?:value notation.
like:
<?php
$str = array('test');
list($a, $b) = is_array($str)?:$str;
and this make *the patch doesn't work* (a memory leak)
------------------------------------------------------------------------
[2011-10-30 02:08:29] laruence@php.net
The following patch has been added/updated:
Patch Name: bug60169.phpt
Revision: 1319940509
URL: https://bugs.php.net/patch-display.php?bug=60169&patch=bug60169.phpt&revision=1319940509
------------------------------------------------------------------------
[2011-10-30 02:03:53] laruence@php.net
The following patch has been added/updated:
Patch Name: bug60169.diff
Revision: 1319940233
URL: https://bugs.php.net/patch-display.php?bug=60169&patch=bug60169.diff&revision=1319940233
------------------------------------------------------------------------
[2011-10-30 02:01:56] pajoye@php.net
Arnaud, could you try to give a look please? Happens only in 5.4, the recent
optimization in this area could be the cause.
------------------------------------------------------------------------
[2011-10-30 01:56:49] laruence@php.net
I can reproduce this on linux with a more simple script:
<?php
$arr = array("test");
list($a)= is_array($arr)? $arr : $arr;
?>
and I have pasted the bt above~
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=60169--
Edit this bug report at https://bugs.php.net/bug.php?id=60169&edit=1