[php-maint] Bug#496795: php5: Segfaults on infinite recursion
Gergely Nagy
algernon at bonehunter.rulez.org
Wed Aug 27 14:19:27 UTC 2008
Package: php5
Version: 5.2.6-2
Severity: normal
While fiddling around with one project, I accidentally made an infinite
recursion, and PHP went away with a segmentation fault.
A few minutes later, I could reduce the problem to the following snippet:
<?php
function foo () { foo (); }
foo ();
?>
This makes php segfault somewhere in the zend engine. The backtrace here
is rather long, and shares a strong resemblance to the backtrace posted
in #405067.
It should be very easy to reproduce anyway.
Even though infinite recursions are bad, and should be avoided, I
believe that php should handle it a wee-bit better. Perl for example
just eats up all resources it can, until killed, which would be the
expected behaviour, I think.
--
Gergely Nagy <algernon at bonehunter.rulez.org>
More information about the pkg-php-maint
mailing list