ID: 40630 Updated by: [EMAIL PROTECTED] 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:
Notice: Undefined variable: string Previous Comments: ------------------------------------------------------------------------ [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] [EMAIL PROTECTED] 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] [EMAIL PROTECTED] 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 ------------------------------------------------------------------------ [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