|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-07-11 08:58 UTC] david dot tulloh at infaze dot com dot au
[2005-07-11 09:29 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 21:00:02 2025 UTC |
Description: ------------ While trying to craft a relatively complex regex string I caused php to consistently segfault. I then tracked it down to a smaller simpler pattern. PHP 5.1.0-dev (cli) (built: Jul 6 2005 10:55:39) Copyright (c) 1997-2005 The PHP Group Zend Engine v2.1.0-dev, Copyright (c) 1998-2004 Zend Technologies Reproduce code: --------------- <?php preg_match('/(?(?=a) (?R) )/x', 'a', $arr); preg_match_all('/(?(?=a) (?R) )/x', 'a', $arr); echo 'fin', "\n"; # will never print ?> Either preg line will cause the fault. Expected result: ---------------- Anything but a segmentation fault, some kind of error would be nice. Actual result: -------------- Segmentation fault gdb: Starting program: /usr/bin/php -f pcrash.php [Thread debugging using libthread_db enabled] [New Thread -1211468032 (LWP 22573)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1211468032 (LWP 22573)] 0xb7f58362 in pcre_compile () from /usr/lib/libpcre.so.3