From: gunnar at greyhound-data dot com Operating system: MorphOS, Windows, Linux PHP version: 5.0.0RC3 PHP Bug Type: Reproducible crash Bug description: PHP 5.0 crash on long php scripts
Description: ------------ PHP crashes on long source scripts. I use Apache(1.3.31) and PHP 5.0.0rc3 on MorphOS. I noticed that all long scripts (over 1200 lines) will crash the Apache/PHP build. Script with 1000 or less lines run fine in less than a second, as soon as I add a few hundred more lines PHP will die. The amount of compiled lines of code is the limiting factor. A script with 3000 lines of code and 2000 commented out lines runs fine. But the same script with just 1200 lines of code (none of them commented out) dies. It looks like a memory problem but my machine has still more than 250 MB free... The php memory limit (in php.ini) is set to 20MB. Mr Bert Slagter reproduced the crash on Linux and Windows. He said that: The same problem exists here, though on a significant higher linecount. Tried it on WinXP, Apache 1.3.29 with PHP 5.0.0-dev (built: Jul-2-2004). With 17.000 lines everything is fine. With 18.000 of the above lines apache crashes. Verified it by adding and deleting 1.000 lines a few times. Tried it on Linux, CLI PHP 5.0.0-dev (build: Jul-8 -2004). Here it segfaults exactly on 34517 lines. One line less, no problem. Reproducable. Running under the Zend Debugger Apache doesn't crash. I hope this report will help you to find and fix the problem. If you have any ideas how I extend the number of lines which PHP is able to compile on MorphOS, then please tell me. Kind regards Gunnar Reproduce code: --------------- Any code which is long enough will crash PHP I verified this with a very simple test script <? $i++ print "$i<br>"; $i++ print "$i<br>"; ...[1000 more lines like the above].. ?> Actual result: -------------- PHP crashes. PHP on MorphOS will crash on scripts longer than 1500 lines. PHP on WinXP will crash an script longer 18,000 lines. Tried it on WinXP, Apache 1.3.29 with PHP 5.0.0-dev (built: Jul-2-2004). On linux PHP will crash an scripts longer than 35,000 lines. -- Edit bug report at http://bugs.php.net/?id=29086&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29086&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29086&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29086&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29086&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29086&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29086&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29086&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29086&r=support Expected behavior: http://bugs.php.net/fix.php?id=29086&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29086&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29086&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29086&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29086&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29086&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29086&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29086&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29086&r=float