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] [EMAIL PROTECTED]

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

Reply via email to