From: Operating system: *nix PHP version: 5.2.14 Package: PCRE related Bug Type: Bug Bug description:PHP crash when PCRE exceed recursion limit.
Description:
------------
Hello, I've got "Zero Sized Reply" when I try to replace a long string with
PCRE.
Test script:
---------------
<?php
$strtest='';
for($i=0; $i<1024; $i++)$strtest.=chr(rand(1, 254));
$strtest.='B';
for($i=0; $i<1024*512; $i++)$strtest.=chr(rand(1, 254));
$strtest.='signature';
for($i=0; $i<1024; $i++)$strtest.=chr(rand(1, 254));
preg_replace('/b(?:.(?!signature))*.(sig.+)/sim', 'null${1}', $strtest);
?>
Expected result:
----------------
blank page
Actual result:
--------------
ERROR
The requested URL could not be retrieved
While trying to retrieve the URL: *******
The following error was encountered:
Zero Sized Reply
Squid did not receive any data for this request.
Your cache administrator is *******.
Generated Tue, 05 Oct 2010 05:28:19 GMT by ******* (squid/2.7.STABLE3)
--
Edit bug report at http://bugs.php.net/bug.php?id=52990&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=52990&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=52990&r=trysnapshot53
Try a snapshot (trunk):
http://bugs.php.net/fix.php?id=52990&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=52990&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=52990&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=52990&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=52990&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=52990&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=52990&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=52990&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=52990&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=52990&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=52990&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=52990&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52990&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=52990&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=52990&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=52990&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=52990&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=52990&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=52990&r=mysqlcfg
