php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52562 Crash when using $GLOBALS
Submitted: 2010-08-07 18:10 UTC Modified: 2010-08-08 00:40 UTC
From: nick at witthaus dot com Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.3.3 OS:
Private report: No CVE-ID: None
 [2010-08-07 18:10 UTC] nick at witthaus dot com
Description:
------------
There seems to be a crash in 5.3.3 when trying to access the value of a $GLOBALS 
array variable when there is another $GLOBALS variable is used as an index.  This 
worked in 5.3.2.



Test script:
---------------
<?php

$GLOBALS['foo'] = array('foo0','foo1');
$GLOBALS['bar'] = 0;

echo $GLOBALS['foo'][$GLOBALS['bar']];

?>

Expected result:
----------------
I expect to see 'foo0' echoed.

Actual result:
--------------
Causes a crash in 5.3.3.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-07 18:14 UTC] felipe@php.net
-Status: Open +Status: Feedback
 [2010-08-07 18:14 UTC] felipe@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

I cannot reproduce this. Are you using some extension that touches in the engine?
 [2010-08-07 18:58 UTC] nick at witthaus dot com
Sorry, I had eAccelerator installed and that seemed to be causing the problem.  I 
removed it and it worked as expected.  I apologize for being an idiot.
 [2010-08-08 00:40 UTC] felipe@php.net
-Status: Feedback +Status: Bogus
 [2010-08-08 00:40 UTC] felipe@php.net
No problem, thanks for reporting anyway! ;)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 05:01:29 2024 UTC