Edit report at https://bugs.php.net/bug.php?id=60613&edit=1

 ID:                 60613
 Updated by:         [email protected]
 Reported by:        do dot hiroaki at gmail dot com
 Summary:            Segmentation fault with $cls->{expr}() syntax
-Status:             Assigned
+Status:             Closed
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   CentOS5.6
 PHP Version:        5.4SVN-2011-12-28 (snap)
-Assigned To:        dmitry
+Assigned To:        laruence
 Block user comment: N
 Private report:     N

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

hmm, I will trigger a E_COMPILER_ERROR while in this situation, since it 
doesn't 
make sense for a no-string method name.
Dmitry, you maybe want to review this fix. thanks :)


Previous Comments:
------------------------------------------------------------------------
[2011-12-28 06:45:47] [email protected]

Automatic comment from SVN on behalf of laruence
Revision: http://svn.php.net/viewvc/?view=revision&revision=321458
Log: Fix #60613 (Segmentation fault with $cls->{expr}() syntax)
#now the behavior is like 5.3, a COMPILER_ERROR will be triggered

------------------------------------------------------------------------
[2011-12-28 06:14:39] [email protected]

dmitry,  I have a quick look at this, since due to cache mechanism, I have not 
gat  familiar with this area.

it is better if you can have a look at this. I will keep troubleshooting anyway 
:).

backtrace:
#0  0x0000000000998aa5 in ZEND_INIT_METHOD_CALL_SPEC_CV_CONST_HANDLER 
(execute_data=0x2a95dac0e8) at /home/huixc/opensource/php-
src/trunk/Zend/zend_vm_execute.h:28982
28982                   if (IS_CONST != IS_CONST ||
(gdb) bt
#0  0x0000000000998aa5 in ZEND_INIT_METHOD_CALL_SPEC_CV_CONST_HANDLER 
(execute_data=0x2a95dac0e8) at /home/huixc/opensource/php-
src/trunk/Zend/zend_vm_execute.h:28982
#1  0x00000000008dbc57 in execute (op_array=0x2a95de3708) at 
/home/huixc/opensource/php-src/trunk/Zend/zend_vm_execute.h:410
#2  0x00000000008a3f0b in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at /home/huixc/opensource/php-src/trunk/Zend/zend.c:1272
#3  0x00000000008235c3 in php_execute_script (primary_file=0x7fbffff280) at 
/home/huixc/opensource/php-src/trunk/main/main.c:2476
#4  0x00000000009c5981 in do_cli (argc=2, argv=0x7fbffff568) at 
/home/huixc/opensource/php-src/trunk/sapi/cli/php_cli.c:983
#5  0x00000000009c6822 in main (argc=2, argv=0x7fbffff568) at 
/home/huixc/opensource/php-src/trunk/sapi/cli/php_cli.c:1356

------------------------------------------------------------------------
[2011-12-28 04:22:48] do dot hiroaki at gmail dot com

Description:
------------
I reported Bug #60611 and this bug was fixed.

Bat segmentation fault occurred yet when using $cls->{expr}() syntax only.


Test script:
---------------
class Cls {
    function __call($name, $arg) {
    }
}

$cls = new Cls();
$cls->{0}();
$cls->{1.0}();
$cls->{true}();
$cls->{false}();
$cls->{null}();

echo 'done';


Expected result:
----------------
done

Actual result:
--------------
Segmentation fault


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



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

Reply via email to