#40630 [Opn->Fbk]: preg_match_all with a particular regexp causes run-away php/apache process
| From: | nlopess@php.net | Date: | Sun, 25 Feb 2007 23:07:55 +0000 |
| Subject: | #40630 [Opn->Fbk]: preg_match_all with a particular regexp causes run-away php/apache process | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-109506@lists.php.net to get a copy of this message | ||
ID: 40630
Updated by: nlopess@php.net
Reported By: mfburdett at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: PCRE related
Operating System: FreeBSD 6.2
PHP Version: 5.2.1
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2007-02-25 20:02:16] mfburdett at gmail dot com
Description:
------------
preg_match_all with a particular regexp causes a run-away Apache/PHP
processes which consumes all available CPU. This is on amd64
architecture; FreeBSD 6.2; PCRE 7.0 and PHP 5.2.1 installed through
FreeBSD ports.
Reproduce code:
---------------
$regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?:
[^",]*))%x';
preg_match_all($regexp, $string, $matches);
Expected result:
----------------
It should compile and execute.
Actual result:
--------------
Process consumes all available CPU until killed.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40630&edit=1