ID:               20802
 Comment by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Critical
 Bug Type:         Reproducible crash
 Operating System: Redhat 7.0
 PHP Version:      4.3.0RC2
 New Comment:

I can also verify this with 4.3.0-cvs. With the cli PHP I can get a
core dump showing a nearly endless calling stack - probably the
memory_limit only looks at the data size, not at the stack size (but of
course this huge stack usage should not happen in the first place).

#0  0x081d0c26 in php_error_cb ()
(gdb) bt -30
#29239 0x081d0c4d in php_error_cb ()
#29240 0x08209b38 in zend_error ()
#29241 0x081f5d03 in _emalloc ()
#29242 0x081f5fc1 in _erealloc ()
#29243 0x081d4154 in xbuf_resize ()
#29244 0x081d41ec in xbuf_init ()
#29245 0x081d4f4a in vspprintf ()
#29246 0x081d0c4d in php_error_cb ()
#29247 0x08209b38 in zend_error ()
#29248 0x081f5d03 in _emalloc ()
#29249 0x081f5fc1 in _erealloc ()
#29250 0x081d4154 in xbuf_resize ()
#29251 0x081d41ec in xbuf_init ()
#29252 0x081d4f4a in vspprintf ()
#29253 0x081d0c4d in php_error_cb ()
#29254 0x08209b38 in zend_error ()
#29255 0x081f5d03 in _emalloc ()
#29256 0x081f5fc1 in _erealloc ()
#29257 0x081d4154 in xbuf_resize ()
#29258 0x081d41ec in xbuf_init ()
#29259 0x081d4f4a in vspprintf ()
#29260 0x081d0c4d in php_error_cb ()
#29261 0x08209b38 in zend_error ()
#29262 0x081f61fe in _erealloc ()
#29263 0x08205ab5 in concat_function ()
#29264 0x08218c48 in execute ()
#29265 0x08209fa4 in zend_execute_scripts ()
#29266 0x081d32dc in php_execute_script ()
#29267 0x08221707 in main ()
#29268 0x402718c1 in __libc_start_main (main=0x8220b48 <main>, argc=3,

    argv=0xbfffe944, init=0x80792f8 <_init>, fini=0x826c8f4 <_fini>, 
    rtld_fini=0x4000a914 <_dl_fini>, stack_end=0xbfffe93c)
    at ../sysdeps/generic/libc-start.c:92


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

[2002-12-04 00:33:07] [EMAIL PROTECTED]

Veryfied with PHP 4.4.0-dev (Nov 29 2002) and PHP 4.3.0-dev (Nov 25
2002). With both versions the script just ended without any error
message, but there is no segmentation fault.

Derick

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

[2002-12-03 16:12:50] [EMAIL PROTECTED]

I have a php installation with a memory limit set to 8MB. If I try to
run this script

<?
for ($i=0; $i<=10000000; $i++) {
        $var.="a";
}

echo "all is ok";
?>

I don't receive an error like "memory limit excedeed" (10MB > 8MB),
simply the server kills the connection without any error on the screen
or in the logs.

Server configuration:
Linux Redhat 7.0
Apache 1.3.22
PHP 4.3.0RC2
Zend Optimizer 2.0.3
Mysql 4.0.5

Configure:
'./configure' '--enable-track-vars' '--prefix=/usr'
'--exec-prefix=/usr'
'--libexecdir=/usr/lib/apache' '--bindir=/usr/bin'
'--sbindir=/usr/sbin'
'--datadir=/home/httpd' '--sysconfdir=/etc/httpd/conf'
'--localstatedir=/var' '--libdir=/usr/lib/apache'
'--includedir=/usr/include/apache' '--mandir=/usr/man'
'--with-mysql=/usr'
'--enable-memory-limit' '--with-config-file-path=/usr/local/Zend/etc'
'--with-apxs' '--with-zlib'



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


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

Reply via email to