PHP 4.0 Bug #5025 Updated: Segmentation fault when using deeply nested scripts
| From: | Bug Database | Date: | Thu, 15 Jun 2000 04:23:18 +0000 |
| Subject: | PHP 4.0 Bug #5025 Updated: Segmentation fault when using deeply nested scripts | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-21378@lists.php.net to get a copy of this message | ||
ID: 5025
User Update by: mlemos@acm.org
Status: Open
Bug Type: Reproduceable crash
Description: Segmentation fault when using deeply nested scripts
Phew, it turned out to be infinite recursion problem. I was in sympathy
error with my code and I could not figure that it was going through a large
infinite recursion loop.
I don't think there is nothing to fix in PHP except for some mechanisms to
prevent programmers to go crazy with sympathy error due to infinite
recursion like I was. Infinite recursion problems is programmers fault,
but it would be nice if there was an option that would enforce a an
effective limit to how many time a function may call itself whether
directly or indirectly.
The way it is now, these simple lines make PHP crash with segmentation fault:
<?
Function myfunction()
{
return(myfunction());
}
echo myfunction();
?>
Full Bug description available at: http://bugs.php.net/version4/?id=5025