Bug #48034 [Com]: Crash when script is 8192 (8KB) bytes long
| From: | dmitry at zend dot com | Date: | Mon, 16 Jan 2012 14:46:01 +0000 |
| Subject: | Bug #48034 [Com]: Crash when script is 8192 (8KB) bytes long | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-166489@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=48034&edit=1
ID: 48034
Comment by: dmitry at zend dot com
Reported by: ninzya at inbox dot lv
Summary: Crash when script is 8192 (8KB) bytes long
Status: Assigned
Type: Bug
Package: Reproducible crash
Operating System: *
PHP Version: 5.*, 6CVS (2009-04-21)
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
Can anyone check if the attached patch fixes the problem?
Previous Comments:
------------------------------------------------------------------------
[2012-01-16 11:56:48] pvasilevich at parallels dot com
This problem reproduced in 5.3.9 released in public/
It looks like temporary workaround commmited by dmitry in
Revision: 279490
(Date: 2:13:30 PM, Tuesday, April 28, 2009)
Message:
Fixed bug #48034 (PHP crashes when script is 8192 (8KB) bytes long)
has been replaced by
Revision: 316812
Author: dmitry
Date: 6:30:17 PM, Thursday, September 15, 2011
Message:
Fixed bug #50982 (incorrect assumption of PAGE_SIZE size)
And bug appeared again.
Please fix this problem ASAP.
------------------------------------------------------------------------
[2012-01-11 09:35:29] bugzilla33 at gmail dot com
The shortest working example:
<?php
file_put_contents('8192_testcase.php',str_repeat(' ',8192));
?>
<a href="8192_testcase.php">run testcase</a>
Use Apache 2.2.21, PHP 5.*, Win 7 x86/x64
------------------------------------------------------------------------
[2012-01-11 09:12:08] bugzilla33 at gmail dot com
Description:
------------
1. use Test script to generate crash.php, size 8192 bytes
2. now let crash php engine crash.php
3. Any php file of size 8192 bytes crashes Apache and PHP!
4. Tested with Apache 2.2.21 V9 apache longue, PHP 5.4.0 RC5 or RC6 dev on three other machines, Win
7 x86 or Win 7 x64.
Test script:
---------------
testcase php file generator:
<?php
$out='<?php//';
for($z=0;$z<8192-9;$z++){$out.=mt_rand(0,9);}
$out.='?>';
file_put_contents('crash.php',$out);
print('1. testcase file generated: crash.php, size '.strlen($out).'
bytes<br/>');
print('2. now let crash php engine <a
href="crash.php">crash.php</a><br/>');
print('<b style="color:red">3. Any php file of size 8192 bytes crashes Apache
and PHP!</b><br/>');
print('4. Tested with Apache 2.2.21 V9 apache longue, PHP 5.4.0 RC5 or RC6 dev on three other
machines, Win 7 x86 or Win 7 x64.<br/>');
?>
Expected result:
----------------
NO crash
Actual result:
--------------
CRASH
------------------------------------------------------------------------
[2009-05-04 16:06:37] pajoye@php.net
Not fixed. Only a temp hack.
------------------------------------------------------------------------
[2009-04-28 07:16:19] dmitry@php.net
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=48034
--
Edit this bug report at https://bugs.php.net/bug.php?id=48034&edit=1