Bug #53858 [Bgs]: infinite loop in __tostring() causes seg fault
| From: | alok at fb dot com | Date: | Tue, 01 Feb 2011 17:43:58 +0000 |
| Subject: | Bug #53858 [Bgs]: infinite loop in __tostring() causes seg fault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-158413@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53858&edit=1
ID: 53858
User updated by: alok at fb dot com
Reported by: alok at fb dot com
Summary: infinite loop in __tostring() causes seg fault
Status: Bogus
Type: Bug
Package: Class/Object related
Operating System: All
PHP Version: 5.3.5
Block user comment: N
Private report: N
New Comment:
scott: was a previous bug filed? Do you have the bug id.
iliaa: a reproducible seg fault not a bug? Sure...
Previous Comments:
------------------------------------------------------------------------
[2011-02-01 14:32:55] iliaa@php.net
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
------------------------------------------------------------------------
[2011-01-28 10:37:32] scottmac@php.net
This is a crash in stock PHP 5.2 too, Our version in APE has a patch
that adds
fb.recursion_max and overrides zend_execute to do the counting.
------------------------------------------------------------------------
[2011-01-27 19:01:25] alok at fb dot com
Description:
------------
The following piece of code would cause "PHP Fatal error: [php_fb]:
call depth has exceeded the maximum recursion setting of 500!, eject!
eject! eject!..." in 5.2.5. However, on versions 5.3.3 and 5.3.5, I am
seeing a segmentation fault.
Test script:
---------------
<?php
class A { public function __toString() { (string)$this; } }
(string)new A();
Expected result:
----------------
"PHP Fatal error: [php_fb]: call depth has exceeded the maximum
recursion setting of 500!, eject! eject! eject!..." seems a reasonable
result.
Actual result:
--------------
segmentation fault
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53858&edit=1