From: guus dot leeuw at guusleeuwit dot com
Operating system: RedHat FC6 x64
PHP version: 5.2.0
PHP Bug Type: Reproducible crash
Bug description: Segfault when function is called recursively
Description:
------------
Using the script below causes PHP to crash with a segfault. I would expect
PHP to catch a recursion like this and report an error through php_error or
some such.
Reproduce code:
---------------
<?php
class A {
function last_error()
{
return $this->last_error();
}
}
$a = new A();
echo $a->last_error();
exit(0);
?>
Expected result:
----------------
I expect an error along the lines of:
brk() problem when calling function last_error(). Cannot increase stack
space.
Actual result:
--------------
Segmentation fault
--
Edit bug report at http://bugs.php.net/?id=40381&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=40381&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=40381&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=40381&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40381&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=40381&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40381&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40381&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40381&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40381&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40381&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=40381&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=40381&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40381&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40381&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40381&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40381&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40381&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40381&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40381&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40381&r=mysqlcfg