#34273 [Opn->Fbk]: `php -a` segfaults when referencing an array
| From: | johannes@php.net | Date: | Fri, 26 Aug 2005 20:21:08 +0000 |
| Subject: | #34273 [Opn->Fbk]: `php -a` segfaults when referencing an array | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-84048@lists.php.net to get a copy of this message | ||
ID: 34273
Updated by: johannes@php.net
Reported By: michael at ezyield dot com
-Status: Open
+Status: Feedback
Bug Type: Unknown/Other Function
Operating System: Slackware Linux-CURRENT (x86)
PHP Version: 5.0.4
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2005-08-26 21:50:11] michael at ezyield dot com
Description:
------------
PHP segfaults when referencing an array. Here is my `php -i | grep
configure` info:
Configure Command => './configure' '--with-pgsql' '--with-mysql'
'--with-mcrypt' '--with-ttf' '--enable-gd'
'--enable-gd-native-ttf'
'--enable-calendar' '--with-apxs2=/www/bin/apxs' '--with-mod_charset'
'--with-xml-dir' '--with-xsl' '--with-xml'
Reproduce code:
---------------
bash-3.00$ php -a
Interactive mode enabled
<?php
$arr_result['package'] = "0.00";
if ((integer) $arr_result['package'] == 0) $arr_result['package'] =
"";
print $arr_result['package'] . "\n";
Segmentation fault
Expected result:
----------------
I expected it to print a blank line.
Actual result:
--------------
Segmentation fault
Here is a backtrace on the core:
#0 0x081a4cd0 in execute (op_array=0x8295864) at
/usr/src/php-5.0.4/Zend/zend_execute.c:1406
#1 0x0817ff1b in execute_new_code () at
/usr/src/php-5.0.4/Zend/zend_execute_API.c:1090
#2 0x0816c940 in zendparse () at Zend/zend_language_parser.c:2359
#3 0x08170321 in compile_file (file_handle=0xbffff870, type=2) at
Zend/zend_language_scanner.c:3157
#4 0x081884e3 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /usr/src/php-5.0.4/Zend/zend.c:1065
#5 0x0815676d in php_execute_script (primary_file=0xbffff870) at
/usr/src/php-5.0.4/main/main.c:1632
#6 0x081aec49 in main (argc=2, argv=0xbffff8f4) at
/usr/src/php-5.0.4/sapi/cli/php_cli.c:946
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34273&edit=1