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

From: Date: Mon, 26 Feb 2007 16:36:23 +0000
Subject: #40630 [Fbk->Opn]: 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-109575@lists.php.net to get a copy of this message
ID: 40630 User updated by: mfburdett at gmail dot com Reported By: mfburdett at gmail dot com -Status: Feedback +Status: Open Bug Type: PCRE related Operating System: FreeBSD 6.2 PHP Version: 5.2.1 New Comment: <?php $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x'; $string = ''; preg_match_all($regexp, $string, $matches); ?> Previous Comments: ------------------------------------------------------------------------ [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. ------------------------------------------------------------------------ [2007-02-25 23:07:55] nlopess@php.net 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 ------------------------------------------------------------------------ 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

« previous php.bugs (#109575) next »