Ask a Question related to PHP Development, Design and Development.
-
sniper@php.net #1
#25394 [Opn->Bgs]: Segfault and Crash on long scripts.
ID: 25394
Updated by: [email]sniper@php.net[/email]
Reported By: mark dot meredith at shaw dot ca
-Status: Open
+Status: Bogus
Bug Type: Reproducible crash
Operating System: MAC OS 10.2.6
PHP Version: 4CVS-2003-09-06 (stable)
New Comment:
Can not reproduce with a script that has $x=1 about 500'000 times. Only
thing I get is:
Allowed memory size of 8388608 bytes exhausted at
/usr/src/web/php/php4_3/Zend/zend_opcode.c:48 (tried to allocate
11796480 bytes)
I suggest you use '--enable-memory-limit' configure option and set the
'memory_limit' directive in php.ini to a reasonable amount. This will
prevent any stupid scripts like this from crashing.
Previous Comments:
------------------------------------------------------------------------
[2003-09-06 03:50:36] mark dot meredith at shaw dot ca
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 this bug report at [url]http://bugs.php.net/?id=25394&edit=1[/url]
sniper@php.net Guest
-
#25738 [Com]: Long Scripts Consistently Segfault
ID: 25738 Comment by: phpnet at baskettcase dot com Reported By: ohornoiu at bellevuechristian dot org Status: ... -
#25738 [NEW]: Long Scripts Consistently Segfault
From: ohornoiu at bellevuechristian dot org Operating system: Mac OS X 10.2.6+ PHP version: 4.3.3 PHP Bug Type: Reproducible... -
#25394 [Com]: Segfault and Crash on long scripts.
ID: 25394 Comment by: phpnet at baskettcase dot com Reported By: mark dot meredith at shaw dot ca Status: Bogus... -
#25394 [Bgs->Opn]: Segfault and Crash on long scripts.
ID: 25394 User updated by: mark dot meredith at shaw dot ca Reported By: mark dot meredith at shaw dot ca -Status: ... -
#25394 [NEW]: Segfault and Crash on long scripts.
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: ...



Reply With Quote

