#40630 [Opn->Fbk]: preg_match_all with a particular regexp causes run-away php/apache process

From: Date: Mon, 26 Feb 2007 16:46:20 +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-109578@lists.php.net to get a copy of this message
 ID:               40630
 Updated by:       tony2001@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:

Does PHP CLI work for you?
What kind of Apache are you using? Version? MPM?
Can you provide a GDB backtrace?
Can you try building the snapshot (doesn't matter where, you don't have
to install it, just build it and run the script using sapi/cli/php).


Previous Comments:
------------------------------------------------------------------------

[2007-02-26 16:36:22] mfburdett at gmail dot com

<?php 
  $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?:
[^",]*))%x'; 
  $string = ''; 
  preg_match_all($regexp, $string, $matches); 
?>

------------------------------------------------------------------------

[2007-02-26 16:35:11] tony2001@php.net

Notice: Undefined variable: string 

------------------------------------------------------------------------

[2007-02-26 16:32:14] mfburdett at gmail dot com

<?php 
  $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?:
[^",]*))%x'; 
  preg_match_all($regexp, $string, $matches); 
?>

------------------------------------------------------------------------

[2007-02-26 09:31:50] tony2001@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.



------------------------------------------------------------------------

[2007-02-26 00:28:04] mfburdett at gmail dot com

At the moment I don't have access to a non-production amd64 box, so I
cannot test the snapshot.  I cannot reproduce the issue on a i386 box.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/40630

-- 
Edit this bug report at http://bugs.php.net/?id=40630&edit=1


Thread (12 messages)

« previous php.bugs (#109578) next »