ID:               16360
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Open
 Bug Type:         Reproducible crash
 Operating System: Linux, Windows
 PHP Version:      4.0CVS-2002-03-30
 New Comment:

I did the same test on my machine (Linux 2.4.18, PHP 4.1.2
CGI-Version).
My php.ini looks like this:

memory_limit = 8M
log_errors = On
error_log = syslog

When I run the test routine nothing appears in my syslog and I get the
segfault.


Previous Comments:
------------------------------------------------------------------------

[2002-03-30 10:36:36] [EMAIL PROTECTED]

found two machines that are not affected by this bug:
http://phpzone.de/info/
http://angela.nettrade.de/info.php

------------------------------------------------------------------------

[2002-03-30 10:24:59] [EMAIL PROTECTED]

fixed the summary

------------------------------------------------------------------------

[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

Reply via email to