------- You are receiving this mail because: -------
You are on the CC list for the bug.
http://bugs.exim.org/show_bug.cgi?id=1500
Summary: PCRE raises PREG_BACKTRACK_LIMIT_ERROR with POSSESSIVE
quantifier ++
Product: PCRE
Version: 8.32
Platform: Other
OS/Version: Linux
Status: NEW
Severity: bug
Priority: critical
Component: Code
AssignedTo: ph10@???
ReportedBy: info@???
QAContact: info@???
CC: pcre-dev@???
I use PCRE in PHP, when the folloing script is run on PCRE 8.02 (PHP 5.2.17) it
runs correctly, when I update the pcre module to 8.32 or later (PHP 5.3.28) it
stops working raising an error, PREG_BACKTRACK_LIMIT_ERROR, but only
possessive quantifiers (non backtraking) are used !!!
$pattern_backtrack='/^((a*b*)*)+$/ADsuX';
$pattern_possessive='/^((a*+b*+)*+)++$/ADsuX';
$subject='aaaaaaaaaaaaaaaabaaaaaaabaaababbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaababababbaaaaaaaaaaaaaaaaabbaabaaaaaaaaaaaaaaaabbbaaaaaaaaaaaaaaaaaaaaaaaaabbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbaaac';
preg_match_all($pattern_possessive, $subject, $m); // Call PCRE with
Possessive
$pcre_error_code_possessive=preg_last_error(); // Get PCRE Error Code
Until PCRE 8.02 preg_last_error() returns PCRE_NO_ERROR,
since PCRE 8.32 it erroneusly return PREG_BACKTRACK_LIMIT_ERROR as the
$pattern_backtrack version normally do, with the call:
preg_match_all($pattern_backtrack, $subject, $m); // Call PCRE con Backtrack
--
Configure bugmail:
http://bugs.exim.org/userprefs.cgi?tab=email