#34273 [NEW]: `php -a` segfaults when referencing an array
| From: | michael at ezyield dot com | Date: | Fri, 26 Aug 2005 19:50:13 +0000 |
| Subject: | #34273 [NEW]: `php -a` segfaults when referencing an array | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-84047@lists.php.net to get a copy of this message | ||
From: michael at ezyield dot com
Operating system: Slackware Linux-CURRENT (x86)
PHP version: 5.0.4
PHP Bug Type: Unknown/Other Function
Bug description:
php -a segfaults when referencing an array
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 bug report at http://bugs.php.net/?id=34273&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34273&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34273&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34273&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34273&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34273&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34273&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34273&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34273&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34273&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34273&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=34273&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=34273&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34273&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34273&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34273&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34273&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34273&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34273&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34273&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34273&r=mysqlcfg