Edit report at http://bugs.php.net/bug.php?id=53858&edit=1

 ID:                 53858
 Updated by:         il...@php.net
 Reported by:        alok at fb dot com
 Summary:            infinite loop in __tostring() causes seg fault
-Status:             Open
+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:

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




Previous Comments:
------------------------------------------------------------------------
[2011-01-28 10:37:32] scott...@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

Reply via email to