#28687 [Opn->Fbk]: return $value & segmentation fault
| From: | derick@php.net | Date: | Tue, 08 Jun 2004 07:46:36 +0000 |
| Subject: | #28687 [Opn->Fbk]: return $value & segmentation fault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-60548@lists.php.net to get a copy of this message | ||
ID: 28687
Updated by: derick@php.net
Reported By: equake at epmail dot com dot br
-Status: Open
+Status: Feedback
Bug Type: Reproducible crash
Operating System: Linux 2.4.24
PHP Version: 5.0.0RC2
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2004-06-07 23:40:09] equake at epmail dot com dot br
Description:
------------
I got a Segmentation Fault every time that I try to return some method
that does not exists.
Reproduce code:
---------------
abstract class test {
function __call($method, $params) {
if (is_callable(array($this, $method))) {
echo ("ok<br>");
return $this->{$method}($params); // abstract class test {
function __call($method, $params) {
if (is_callable(array($this, $method))) {
echo ("ok<br>");
return $this->{$method}($params); // [error_log] [notice] child pid
# exit signal Segmentation fault (11)
}
}
}
class test2 extends test {
function __construct() {
echo ("hi, im test2 at ". time () ." seconds since 01/01/1970
<br>");
}
function bla() {
echo ('haha');
}
}
$x = new test2();
$x->bla_inexistent(); // any inexistent method name
}
}
}
class test2 extends test {
function __construct() {
echo ("hi, im test2 at ". time () ." seconds since 01/01/1970
<br>");
}
function bla() {
echo ('haha');
}
}
$x = new test2();
$x->bla_inexistent(); // any inexistent method name
Expected result:
----------------
hi, im test2 at 1086644752 seconds since 01/01/1970
Actual result:
--------------
"[error_log] [notice] child pid # exit signal Segmentation fault (11)"
on the apache Error Log
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28687&edit=1