Bug #63523 [Opn->Nab]: Calling nonexistent method via __call or __callStatic causes segmentation fault
Edit report at https://bugs.php.net/bug.php?id=63523&edit=1
ID: 63523
Updated by: felipe@php.net
Reported by: lolbummer at gmail dot com
Summary: Calling nonexistent method via __call or
__callStatic causes segmentation fault
-Status: Open
+Status: Not a bug
Type: Bug
Package: Reproducible crash
Operating System: Mac OS X 10.8.2
PHP Version: 5.4.8
Block user comment: N
Private report: N
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
This is a known problem caused by a call stack overflow.
Previous Comments:
------------------------------------------------------------------------
[2012-11-14 21:29:32] lolbummer at gmail dot com
Description:
------------
When calling a nonexistent method from __call or __callStatic, PHP crashes with
the message "Segmentation Fault: 11"
Replicable in both PHP 5.3.18 and 5.4.8.
Test script:
---------------
class SegFault{
public function __call($m, $a){
$this->hjkl();
}
}
$obj = new SegFault();
$obj->asdf();
--OR--
class SegFault{
public static function __callStatic($m, $a){
self::hjkl();
}
}
SegFault::asdf();
Expected result:
----------------
I'd imagine a memory exhaustion error or the likes.
Actual result:
--------------
Segmentation fault: 11
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63523&edit=1
Thread (2 messages)