[Webkit-unassigned] [Bug 67455] Different regular expression result

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Oct 2 11:37:19 PDT 2011


--- Comment #3 from Gavin Barraclough <barraclough at apple.com>  2011-10-02 11:37:19 PST ---
Looks like the problem is in YARR interpreter, in backtrackParentheses with QuantifierNonGreedy, and where the expression is passed input to match against that will match the parentheses more than once but then fail.

For the above reduction I believe the interpreter will have torn off a couple of disjunction contexts (recording the matches of 'a' and 'd'), but only one of these contexts gets backtracked back into.  Since the minimum size of these matches is one, failing to backtrack means the input position has not been reverted correctly.  When the match has failed starting at input position 0, we try again at input +1, but instead of starting at position 1 the second pass starts at position 2, hence the first alternative doesn't get a chance to match.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list