Bug #62049 [Opn]: A specific regex/input combo crashes PHP
Edit report at https://bugs.php.net/bug.php?id=62049&edit=1
ID: 62049
User updated by: arvids dot kokins at di dot lv
Reported by: arvids dot kokins at di dot lv
Summary: A specific regex/input combo crashes PHP
Status: Open
Type: Bug
Package: PCRE related
Operating System: Windows
PHP Version: 5.4.3
Block user comment: N
Private report: N
New Comment:
Another example: http://ideone.com/L29ib
If I remove the round brackets, the example works though: http://ideone.com/3ILgY
Previous Comments:
------------------------------------------------------------------------
[2012-05-16 20:34:07] arvids dot kokins at di dot lv
Looks like a warning is thrown with an internal error: http://codepad.org/FmlJi8N9
Some configurations need bigger input strings to trigger a crash, some react
differently...
Got HTTP error 101 (connection was reset) at home with the word "error" repeated
25 times.
------------------------------------------------------------------------
[2012-05-16 19:58:30] nulle at gmx dot com
Apache 2.2.9
PHP 5.3.1
Windows
Everything works fine.
------------------------------------------------------------------------
[2012-05-16 15:54:06] arvids dot kokins at di dot lv
Description:
------------
Test script crashes on web server (Apache 2.2.21) only with "empty response"
(324). Suspected to be a limit/overflow problem since it works if "errorerror" is
replaced with "error".
Test script:
---------------
<?php
echo preg_match( '/^<a(.)+class="(.)?actor-link(.)?"(.)+>Super
User<\/a>/', '<a class="actor-link"
href="/errorerror.lv/lv/jomsocial/42-super-user/profile">Super User</a> added 2
new photos in <a
href="/errorerror.lv/lv/jomsocial/42-super-user/photos/album?albumid=1">crap</a>
album' );
echo "\nFINISHED!";
?>
Expected result:
----------------
"1\nFINISHED"
Actual result:
--------------
HTTP error 324: empty response. Probably PHP crash. Apache didn't crash.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62049&edit=1
Thread (6 messages)