|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-07-10 03:34 UTC] daniel dot goss at t-systems dot com
Description: ------------ I know this bug has been reported as "Bug #18909: Stack overflow error" but I think this should be fixed and not treated as bogus like in bug #18909. Scripting engines should _never_ segfault! A stack overflow in a recursive php-function leads the php-engine to a segmentation fault. There is a second issue that could be in associated with this one. If a function is called very often (sometimes recoursive - depth not greater than 20) php crashes too. We've not investigated this issue further enough to write a script to reproduce this behaviour. Reproduce code: --------------- <? function MyTest($A, $B, $C, $D, $E, $F, $G) { for ($k=0; $k<100; $k++) { echo "|".$A++."|<BR>"; flush(); MyTest($A, "", "", "", "", "", ""); } } MyTest(0,"","","","","",""); ?> Expected result: ---------------- A php error complaining about a stack overflow. Actual result: -------------- [notice] child pid 29029 exit signal Segmentation fault (11) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 13:00:02 2025 UTC |
Here's a very simple test case to reproduce this bug: <?php function crash($data) { crash(1); } crash(1); ?>