|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-03-08 03:28 UTC] derick@php.net
[2004-03-08 03:36 UTC] valvatne at pvv dot org
[2004-03-08 04:00 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 21:00:01 2025 UTC |
Description: ------------ PHP segfaults when running preg_match() with a simple pattern intended to match any sequence of characters which are not followed by a given character (lookahead assertion). The segfault only happens if the string being matched approaches 10k characters in length, but at that point it seems to be 100% reproducible. Config line: ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-pgsql --enable-sockets --enable-debug Reproduce code: --------------- $strlen = 10000; $string = ''; for($i=0;$i<$strlen;$i++) { $string .= "a"; } $pattern = '/(.(?!b))*/'; echo preg_match($pattern, $string); Expected result: ---------------- 1 Actual result: -------------- Segmentation fault. I can't seem to get gdb to behave right now, so if someone else could reproduce the bug and post a backtrace, that would be nice.