php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49617 Problem with references
Submitted: 2009-09-22 01:18 UTC Modified: 2013-02-18 00:34 UTC
From: mstf at mstf dot name dot tr Assigned:
Status: No Feedback Package: Reproducible crash
PHP Version: 5.3, 6 (2009-09-22) OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mstf at mstf dot name dot tr
New email:
PHP Version: OS:

 

 [2009-09-22 01:18 UTC] mstf at mstf dot name dot tr
Description:
------------
Pointers problem.

Reproduce code:
---------------
$a = array('a' => array('b' => 'c'));
$b = &$a;

$b = &$b['a'];
$b = &$b['b'];
$b = &$b['c'];

echo $b;

Expected result:
----------------
NULL

Actual result:
--------------
Apache "Send Error Report"
Apache error.log:
[Sat Aug 22 04:11:34 2009] [notice] Child 3408: Child process is running
[Sat Aug 22 04:11:34 2009] [notice] Child 3408: Acquired the start mutex.
[Sat Aug 22 04:11:34 2009] [notice] Child 3408: Starting 150 worker threads.
[Sat Aug 22 04:11:34 2009] [notice] Child 3408: Starting thread to listen on port 80.
[Sat Aug 22 04:11:34 2009] [notice] Child 3408: Starting thread to listen on port 443.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-22 09:30 UTC] sjoerd@php.net
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x00470df9 in ZEND_FETCH_DIM_W_SPEC_CV_CONST_HANDLER (execute_data=0xb68040) at zend_vm_execute.h:23568
23568			Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
(gdb) bt
#0  0x00470df9 in ZEND_FETCH_DIM_W_SPEC_CV_CONST_HANDLER (execute_data=0xb68040) at zend_vm_execute.h:23568
#1  0x003ec80e in execute (op_array=0xa109f0) at zend_vm_execute.h:104
#2  0x003bd57a in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /Users/sjoerd/Sources/php-src-5.3/Zend/zend.c:1188
#3  0x0034193d in php_execute_script (primary_file=0xbffff7fc) at /Users/sjoerd/Sources/php-src-5.3/main/main.c:2213
#4  0x0049650f in main (argc=4, argv=0xbffff8e8) at /Users/sjoerd/Sources/php-src-5.3/sapi/cli/php_cli.c:1190
(gdb) 

 [2009-09-22 09:45 UTC] jani@php.net
# build/php_5_2/sapi/cli/php -n t.php 

Fatal error: Cannot create references to/from string offsets nor overloaded objects in /home/jani/src/t.php on line 8

# build/php_5_3/sapi/cli/php -n t.php 
Segmentation fault

# build/php_6/sapi/cli/php -n t.php 
Segmentation fault

 [2010-05-19 15:46 UTC] mike@php.net
-Status: Verified +Status: Feedback
 [2010-05-19 15:46 UTC] mike@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2013-02-18 00:34 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Sep 29 04:05:53 2022 UTC