ID:               28396
 User updated by:  operator at infomaniak dot ch
 Reported By:      operator at infomaniak dot ch
-Status:           Bogus
+Status:           Open
 Bug Type:         Reproducible crash
 Operating System: linux glibc 2.2
 PHP Version:      4.3.6
 New Comment:

Have you really tried to put this script and run it 
with a php_admin_value memory_limit 512000  
?


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

[2004-05-14 15:33:46] [EMAIL PROTECTED]

No crashes here and memory analysis tools show no 
suspicious operations. 

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

[2004-05-14 14:05:59] operator at infomaniak dot ch

Alright. This is not true. 
Memory allocation failing due to external bad behaviour 
must cause segfault, not because of memory_limit reached. 
 
Then, I get exactly the same result without 
--enable-debug . 
 
For info, crash occurs exactly when memory_limit is 
reached. 
 
(output just before crash: 
509528 
510552 
511576 
with a memory limit at 512000 
output got without --enable-debug) 
)

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

[2004-05-14 13:46:19] [EMAIL PROTECTED]

This is expected behaviour; in a debug build, when memory allocation
fails, we force a segfault.

Don't run debug builds in production.

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

[2004-05-14 13:23:01] operator at infomaniak dot ch

Description:
------------
When memory limit is reached, this irremdiably cause a 
segfault. 
-- 
php with no extensions at all compiled with: 
    --disable-all \ 
    --with-apxs=/usr/sbin/apxs \ 
    --enable-sigchild \ 
    --disable-ipv6 \ 
    --enable-memory-limit \ 
    --with-config-file-path=/etc/httpd \ 
    --disable-static \ 
    --enable-shared \ 
    --enable-debug 
 
reproductible with any memory_limit value (tried from 512 
bytes to 8M) 

Reproduce code:
---------------
<?
$i=1;
while($i++) {
        $a .= ".";
        if (($i % 1024) == 0) {
                echo memory_get_usage() . "<br/>\n";
                flush();
        }
}
?>


Expected result:
----------------
some kind of "memory exhausted" message 

Actual result:
--------------
apache thread segfault 


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


-- 
Edit this bug report at http://bugs.php.net/?id=28396&edit=1

Reply via email to