ID: 16360 Updated by: [EMAIL PROTECTED] -Summary: Overflow in Array functions Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Reproducible crash Operating System: Linux, Windows PHP Version: 4.0CVS-2002-03-30 New Comment:
fixed the summary Previous Comments: ------------------------------------------------------------------------ [2002-03-30 10:02:40] [EMAIL PROTECTED] If the memory limit of a PHP-script gets exhausted, the PHP interpreter does'nt shut down cleanly and print an error regarding this issue; it segfaults. If the user enables following options in php.ini ([PHP]-section), --- log_errors = On error_log = syslog --- PHP first shows an memory-limit error, after that Apache/PHP dies with an segmentation fault. If "error_log" is set to "/some/file", PHP is unable to log anything. The only logging facility that logs the segmentation fault is syslog. Demonstration: <?php $theline = "hello, i'm the line"; for ($i = 0; $i < 1000000; $i++) $testarr[$i] = $theline; ?> Following script does'nt cause a segmentation fault: <?php for ($i = 0; $i < 1000000; $i++) $testarr[$i] = "hello, i'm the line"; ?> So far we could test following Versions: PHP Webserver OS console (sf/ml) apachemod (sf/ml) 4.0.1 - Linux ? X/- -/- 4.0.2 Apache 1.3.? Linux ? ?/? ?/? 4.0.6 Apache 1.3.19 Linux 2.2.19 X/X X/X 4.0.6 Apache 1.3.22 Linux 2.4.18 X/X X/X 4.1.2 Apache 1.3.22 Linux ? X/X X/X 4.1.2 - Linux 2.4.17 X/X -/- 4.1.2 Apache 1.2.24 Windows 2000 X/- X/- 4.2.0rc1 Apache 1.3.24 Linux 2.4.18 -/X X/X * sf = Segmentation fault * ml = Memory limit error ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16360&edit=1