From nobody@FreeBSD.org  Mon Feb 26 01:40:47 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id A672116A400
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 26 Feb 2007 01:40:47 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 9727213C441
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 26 Feb 2007 01:40:47 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l1Q1el8V065737
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 26 Feb 2007 01:40:47 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l1Q1elG2065734;
	Mon, 26 Feb 2007 01:40:47 GMT
	(envelope-from nobody)
Message-Id: <200702260140.l1Q1elG2065734@www.freebsd.org>
Date: Mon, 26 Feb 2007 01:40:47 GMT
From: mark burdett<mfburdett@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: preg_match_all with a particular regexp causes run-away php/apache process
X-Send-Pr-Version: www-3.0

>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:    ale
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 26 01:50:05 GMT 2007
>Closed-Date:    Sun Mar 11 21:58:04 GMT 2007
>Last-Modified:  Sun Mar 11 21:58:04 GMT 2007
>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@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:
Responsible-Changed-From-To: freebsd-ports-bugs->ale 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Feb 26 06:18:05 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=109542 

From: "mark burdett" <mfburdett@gmail.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/109542: preg_match_all with a particular regexp causes run-away php/apache process
Date: Mon, 26 Feb 2007 12:41:09 -0800

 This seems to be fixed in the latest PHP 5.2 snapshot.  I can only
 reproduce on amd64.
State-Changed-From-To: open->closed 
State-Changed-By: ale 
State-Changed-When: Sun Mar 11 21:57:40 UTC 2007 
State-Changed-Why:  
Should be fixed in cvs. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=109542 
>Unformatted:
