Re: PHP 4.0 Bug #5025 Updated: Segmentation fault when using deeply nested scripts
| From: | Andi Gutmans | Date: | Thu, 15 Jun 2000 04:27:36 +0000 |
| Subject: | Re: PHP 4.0 Bug #5025 Updated: Segmentation fault when using deeply nested scripts | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-21379@lists.php.net to get a copy of this message | ||
There is a way to recover in Windows and we do. However, there isn't any way in UNIX I know of. The only way is really to put an arbitrary limit on the nesting level of function calls. Do we want that? It would add two lines of code to each execute() call.
I'm not sure.
Andi
At 04:23 AM 6/15/00 +0000, Bug Database wrote:
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() {--- Andi Gutmans <andi@zend.com> http://www.zend.com/return(myfunction());} echo myfunction(); ?> Full Bug description available at: http://bugs.php.net/version4/?id=5025 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net