php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34273 `php -a` segfaults when referencing an array
Submitted: 2005-08-26 21:50 UTC Modified: 2005-09-03 01:00 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: michael at ezyield dot com Assigned:
Status: No Feedback Package: Unknown/Other Function
PHP Version: 5.0.4 OS: Slackware Linux-CURRENT (x86)
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2005-08-26 21:50 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-26 22:21 UTC] johannes@php.net
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
 [2005-09-03 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Jan 24 21:03:34 2022 UTC