Edit report at https://bugs.php.net/bug.php?id=60169&edit=1
ID: 60169
Updated by: laruence@php.net
Reported by: thekid@php.net
Summary: Conjunction of ternary and list crashes PHP
Status: Feedback
Type: Bug
Package: Scripting Engine problem
Operating System: Windows Vista
PHP Version: 5.4.0beta2
Block user comment: N
Private report: N
New Comment:
backtrace:
#0 0x00000000008d69e5 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
1244 zval *container = *container_ptr;
(gdb) bt
#0 0x00000000008d69e5 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 0x000000000091630d 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 0x00000000008d79ae in execute (op_array=0x2a95de36e8) at /home/huixc/opensource/php-
src/trunk/Zend/zend_vm_execute.h:410
#3 0x00000000008a0063 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at
/home/huixc/opensource/php-src/trunk/Zend/zend.c:1272
#4 0x0000000000820850 in php_execute_script (primary_file=0x7fbffff2a0) at
/home/huixc/opensource/php-
src/trunk/main/main.c:2414
#5 0x00000000009c12dd in do_cli (argc=2, argv=0x7fbffff588) at /home/huixc/opensource/php-
src/trunk/sapi/cli/php_cli.c:983
#6 0x00000000009c217e in main (argc=2, argv=0x7fbffff588) at /home/huixc/opensource/php-
src/trunk/sapi/cli/php_cli.c:1356
Previous Comments:
------------------------------------------------------------------------
[2011-10-29 14:26:31] pajoye@php.net
I can't reproduce it. Please provide a script without external data (arg).
------------------------------------------------------------------------
[2011-10-29 13:40:32] thekid@php.net
Description:
------------
This code makes PHP exit with exit code #127:
list($a, $b)= is_array($argv) ? $argv : explode("@", $argv[1]);
Test script:
---------------
$ php.exe -r 'list($a, $b)= is_array($argv) ? $argv : explode("@", $argv[1]);' ;
echo $?
Expected result:
----------------
0
Actual result:
--------------
127
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60169&edit=1