Bug #60169 [PATCH]: Conjunction of ternary and list crashes PHP

2011-10-31 Thread larue...@php.net
Edit report at https://bugs.php.net/bug.php?id=60169edit=1

 ID: 60169
 Patch added by: larue...@php.net
 Reported by:the...@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: bug60169.diff
Revision:   1320043736
URL:
https://bugs.php.net/patch-display.php?bug=60169patch=bug60169.diffrevision=1320043736


Previous Comments:

[2011-10-31 03:24:05] larue...@php.net

The following patch has been added/updated:

Patch Name: invalid.patch
Revision:   1320031445
URL:
https://bugs.php.net/patch-display.php?bug=60169patch=invalid.patchrevision=1320031445


[2011-10-31 03:21:58] larue...@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] larue...@php.net

The following patch has been added/updated:

Patch Name: bug60169.phpt
Revision:   1319940509
URL:
https://bugs.php.net/patch-display.php?bug=60169patch=bug60169.phptrevision=1319940509


[2011-10-30 02:03:53] larue...@php.net

The following patch has been added/updated:

Patch Name: bug60169.diff
Revision:   1319940233
URL:
https://bugs.php.net/patch-display.php?bug=60169patch=bug60169.diffrevision=1319940233


[2011-10-30 02:01:56] paj...@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.




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=60169edit=1


Bug #60169 [PATCH]: Conjunction of ternary and list crashes PHP

2011-10-30 Thread larue...@php.net
Edit report at https://bugs.php.net/bug.php?id=60169edit=1

 ID: 60169
 Patch added by: larue...@php.net
 Reported by:the...@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=60169patch=invalid.patchrevision=1320031445


Previous Comments:

[2011-10-31 03:21:58] larue...@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] larue...@php.net

The following patch has been added/updated:

Patch Name: bug60169.phpt
Revision:   1319940509
URL:
https://bugs.php.net/patch-display.php?bug=60169patch=bug60169.phptrevision=1319940509


[2011-10-30 02:03:53] larue...@php.net

The following patch has been added/updated:

Patch Name: bug60169.diff
Revision:   1319940233
URL:
https://bugs.php.net/patch-display.php?bug=60169patch=bug60169.diffrevision=1319940233


[2011-10-30 02:01:56] paj...@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] larue...@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=60169edit=1


Bug #60169 [PATCH]: Conjunction of ternary and list crashes PHP

2011-10-29 Thread larue...@php.net
Edit report at https://bugs.php.net/bug.php?id=60169edit=1

 ID: 60169
 Patch added by: larue...@php.net
 Reported by:the...@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: bug60169.phpt
Revision:   1319940509
URL:
https://bugs.php.net/patch-display.php?bug=60169patch=bug60169.phptrevision=1319940509


Previous Comments:

[2011-10-30 02:03:53] larue...@php.net

The following patch has been added/updated:

Patch Name: bug60169.diff
Revision:   1319940233
URL:
https://bugs.php.net/patch-display.php?bug=60169patch=bug60169.diffrevision=1319940233


[2011-10-30 02:01:56] paj...@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] larue...@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~


[2011-10-30 01:37:39] larue...@php.net

backtrace:

#0  0x008d69e5 in zend_fetch_dimension_address_read 
(result=0x2a95dac1d0, container_ptr=0x0, 
dim=0x2a95de57f8, dim_type=1, type=0)
at /home/huixc/opensource/php-src/trunk/Zend/zend_execute.c:1244
1244zval *container = *container_ptr;
(gdb) bt
#0  0x008d69e5 in zend_fetch_dimension_address_read 
(result=0x2a95dac1d0, container_ptr=0x0, 
dim=0x2a95de57f8, dim_type=1, type=0)
at /home/huixc/opensource/php-src/trunk/Zend/zend_execute.c:1244
#1  0x0091630d in ZEND_FETCH_DIM_R_SPEC_VAR_CONST_HANDLER 
(execute_data=0x2a95dac0e8)
at /home/huixc/opensource/php-src/trunk/Zend/zend_vm_execute.h:12694
#2  0x008d79ae in execute (op_array=0x2a95de36e8) at 
/home/huixc/opensource/php-
src/trunk/Zend/zend_vm_execute.h:410
#3  0x008a0063 in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at 
/home/huixc/opensource/php-src/trunk/Zend/zend.c:1272
#4  0x00820850 in php_execute_script (primary_file=0x7fb2a0) at 
/home/huixc/opensource/php-
src/trunk/main/main.c:2414
#5  0x009c12dd in do_cli (argc=2, argv=0x7fb588) at 
/home/huixc/opensource/php-
src/trunk/sapi/cli/php_cli.c:983
#6  0x009c217e in main (argc=2, argv=0x7fb588) at 
/home/huixc/opensource/php-
src/trunk/sapi/cli/php_cli.c:1356


[2011-10-29 14:26:31] paj...@php.net

I can't reproduce it. Please provide a script without external data (arg).




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=60169edit=1