From: mark dot meredith at shaw dot ca Operating system: MAC OS 10.2.6 PHP version: 4CVS-2003-09-06 (stable) PHP Bug Type: Reproducible crash Bug description: Segfault and Crash on long scripts.
Description: ------------ I have tested this with the 4.3.2 and 4.3.3 official releases as well. I have not tried any earlier releases. I have tried with the command line or as an Apache 1 or Apache 2 module all with the same result. I used no extensions or modules for the builds in all cases. Apparently the bug does not occur for Windows XP Pro and likely some other operating systems. I was told this by some users of a PHP forum who tried their own test scripts. The result of memory_get_usage() placed on a script one line shorter than the crash length returned around 1MB. Thank you. Reproduce code: --------------- <?php /*presumably any long script that consumes enough memory will cause the problem*/ /*this assignment done about 10000 times*/ $x = 1; ?> Expected result: ---------------- Nothing but a clean run through. Actual result: -------------- The backtrace from the STABLE snapshot cli was... (gdb) bt #0 0x00183b9c in execute (op_array=0x4e7c58) at /Users/ markmere/Sources/php4-snapshot/Zend/zend_execute.c:1027 #1 0x0016e334 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /Users/markmere/Sources/php4-snapshot/ Zend/zend.c:885 #2 0x001208e0 in php_execute_script (primary_file=0xbffff7c0) at /Users/markmere/Sources/php4- snapshot/main/main.c:1723 #3 0x0018ea84 in main (argc=2, argv=0xbffffd24) at /Users/ markmere/Sources/php4-snapshot/sapi/cli/php_cli.c:819 #4 0x00002564 in _start (argc=2, argv=0xbffffd24, envp=0xbffffd30) at /SourceCache/Csu/Csu-45/crt.c:267 #5 0x000023e4 in start () -- Edit bug report at http://bugs.php.net/?id=25394&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25394&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25394&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25394&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25394&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25394&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25394&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=25394&r=support Expected behavior: http://bugs.php.net/fix.php?id=25394&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=25394&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=25394&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25394&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25394&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25394&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25394&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=25394&r=gnused