ID:               49617
 Updated by:       j...@php.net
 Reported By:      mstf at mstf dot name dot tr
 Status:           Verified
 Bug Type:         Scripting Engine problem
 Operating System: *
-PHP Version:      5.*, 6
+PHP Version:      5.3, 6 (2009-09-22)
 New Comment:

# 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



Previous Comments:
------------------------------------------------------------------------

[2009-09-22 09:43:09] j...@php.net

PHP does not have pointers..

------------------------------------------------------------------------

[2009-09-22 09:30:11] sjo...@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 01:18:48] 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.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=49617&edit=1

Reply via email to