#30457 [Bgs->Opn]: calling non existent function alias stored in a member array of an object
| From: | kameshj at fastmail dot fm | Date: | Sat, 16 Oct 2004 11:02:13 +0000 |
| Subject: | #30457 [Bgs->Opn]: calling non existent function alias stored in a member array of an object | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-67653@lists.php.net to get a copy of this message | ||
ID: 30457
User updated by: kameshj at fastmail dot fm
Reported By: kameshj at fastmail dot fm
-Status: Bogus
+Status: Open
Bug Type: Reproducible crash
Operating System: Any Operating System
PHP Version: 5.0.2
New Comment:
What you mean by bogus tony?
Previous Comments:
------------------------------------------------------------------------
[2004-10-16 12:32:22] tony2001@php.net
No bug -> bogus.
------------------------------------------------------------------------
[2004-10-16 11:50:34] kameshj at fastmail dot fm
Fixed in both 5.1 HEAD and 5.0.2 tree using hyanantha's account
------------------------------------------------------------------------
[2004-10-16 11:21:30] kameshj at fastmail dot fm
Description:
------------
Calling non existent function alias stored in a member array of an
object causes Segmentation fault. This happens in
PHP-5.0.0
PHP-5.0.1
PHP-5.0.2
PHP-5.1 HEAD
The cause happened to be zend_do_begin_method_call in zend_compile.c.
Here the check exists to check the member method name is __clone. This
check causes a Segmentation fault.
Solution is check for the,
last_op->op2.u.constant.type==IS_STRING before chceking for str.len and
zend_binary_strcasecmp.
This bug breaks the working of Xoops 2.0.8 PHP5.0 port of Xoops.
Reproduce code:
---------------
Segmentation fault case
<?php
$obj->kameaps[0]();
?>
Non Segmentation fault case
<?php
$obj->anymembernamenotequalto7insize[0]();
?>
Expected result:
----------------
Fatal error: Function name must be a string in %s on line %d
Actual result:
--------------
Segmentation fault.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30457&edit=1