|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2000-06-14 11:29 UTC] mlemos at acm dot org
When running a large multi-file script using PHP standalone CGI executable from the shell, it crashes with segmentation fault after running a long and deeply nested (but not recursive) script. This also happens with PHP 3. Running gdb with the latest PHP 4 version, there were 376 stack frames when the program crashed somewhere in Zend code. I thought it was a stack limit problem, but then I run ulimit -s unlimit and it still crashed in the same code. I also set the memory limit to a very high value but with no change. I have a 800KB strace output file if that helps, but all it is seen before the crash is a long sequence of brk() calls. If strace or gdb output helps just mail me back and I'll send the output to an address you want. Since I am stuck without being able to do anything to work around this crash, I am willing to open a telnet port so you can login in my machine when I am online, as my Internet link is not permanent. Just mail me or better, page me to ICQ UIN 15699174. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 10 20:00:02 2026 UTC |
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(); ?>