ports/109542: preg_match_all with a particular regexp causes run-away php/apache process

mark burdett mfburdett at gmail.com
Mon Feb 26 01:50:05 UTC 2007


>Number:         109542
>Category:       ports
>Synopsis:       preg_match_all with a particular regexp causes run-away php/apache process
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 26 01:50:05 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     mark burdett
>Release:        6.2
>Organization:
>Environment:
FreeBSD ramona 6.2-STABLE FreeBSD 6.2-STABLE #0: Sun Feb 25 17:02:42 PST 2007     root at ramona:/usr/obj/usr/src/sys/SMP  amd64
>Description:
preg_match_all() with a particular regexp causes a run-away Apache/PHP
process which consumes all available CPU.  This is on amd64
architecture; FreeBSD 6.2; PCRE 7.0 and PHP 5.2.1 installed through ports.

Also posted here: http://bugs.php.net/bug.php?id=40630
>How-To-Repeat:
Reproduce code:
---------------
<?php 
$regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x'; 
preg_match_all($regexp, $string, $matches); 

Expected result:
----------------
It should compile and execute.

Actual result:
--------------
Process consumes all available CPU until killed.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list