[pcre-dev] [Bug 1500] PCRE raises PREG_BACKTRACK_LIMIT_ERROR…

Top Page
Delete this message
Author: Philip Hazel
Date:  
To: pcre-dev
Subject: [pcre-dev] [Bug 1500] PCRE raises PREG_BACKTRACK_LIMIT_ERROR with POSSESSIVE quantifier ++
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1500

Philip Hazel <ph10@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





--- Comment #1 from Philip Hazel <ph10@???> 2014-07-08 17:31:38 ---
Thanks for your report. This bug has, however, already been fixed in the code
for the next release. This is the ChangeLog entry:

7.  Fixed a bug concerned with zero-minimum possessive groups that could match 
    an empty string, which sometimes were behaving incorrectly in the
    interpreter (though correctly in the JIT matcher). This pcretest input is
    an example:


      '\A(?:[^"]++|"(?:[^"]*+|"")*+")++'
      NON QUOTED "QUOT""ED" AFTER "NOT MATCHED


    the interpreter was reporting a match of 'NON QUOTED ' only, whereas the
    JIT matcher and Perl both matched 'NON QUOTED "QUOT""ED" AFTER '. The test
    for an empty string was breaking the inner loop and carrying on at a lower
    level, when possessive repeated groups should always return to a higher
    level as they have no backtrack points in them. The empty string test now
    occurs at the outer level.


I could reproduce your bug in the 8.35 interpreter, but not with JIT or the
8.36 development code, so I'm sure this is the same bug.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email