#35159 [NEW]: big variable value in recursive function crashes
| From: | pekka at photography-on-the dot net | Date: | Tue, 08 Nov 2005 19:14:04 +0000 |
| Subject: | #35159 [NEW]: big variable value in recursive function crashes | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-87874@lists.php.net to get a copy of this message | ||
From: pekka at photography-on-the dot net
Operating system: Windows XP Pro (also unix)
PHP version: 4.4.1
PHP Bug Type: Unknown/Other Function
Bug description: big variable value in recursive function crashes
Description:
------------
Weird recursive issue with 4.4.1
function test_recursive ($count=0) {
$count++;
if ($count >= 50) {
print "done";
return;
}
test_recursive ($count);
}
test_recursive();
works, but when $count is larger than 197 it crashes (Apache gives error
500)
in PHP 5.0.4 this works ok with any $count
Reproduce code:
---------------
function test_recursive ($count=0) {
$count++;
if ($count >= 500) {
print "done";
return;
}
test_recursive ($count);
}
test_recursive();
Expected result:
----------------
done
Actual result:
--------------
Server: page not found (error 500), php crash.
--
Edit bug report at http://bugs.php.net/?id=35159&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35159&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35159&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35159&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=35159&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35159&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35159&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35159&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35159&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35159&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35159&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35159&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35159&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35159&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35159&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35159&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35159&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35159&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35159&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35159&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35159&r=mysqlcfg