#30457 [Opn->Fbk]: calling non existent function alias stored in a member array of an object
| From: | tony2001@php.net | Date: | Sat, 16 Oct 2004 11:07:41 +0000 |
| Subject: | #30457 [Opn->Fbk]: 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-67654@lists.php.net to get a copy of this message | ||
ID: 30457
Updated by: tony2001@php.net
Reported By: kameshj at fastmail dot fm
-Status: Open
+Status: Feedback
Bug Type: Reproducible crash
Operating System: Any Operating System
PHP Version: 5.0.2
New Comment:
I mean that this bug has already been fixed, so I see no sense in
creating this bug report.
If this bug still exists (though, I'm not able to reproduce it), I
don't understand what did you mean saying that it's been fixed.
Previous Comments:
------------------------------------------------------------------------
[2004-10-16 13:02:12] kameshj at fastmail dot fm
What you mean by bogus tony?
------------------------------------------------------------------------
[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