[Webkit-unassigned] [Bug 200786] New: [Enhancement]: Add ability for the YARR JIT to properly handle nested expressions that can match without consuming characters
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Aug 15 13:37:43 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=200786
Bug ID: 200786
Summary: [Enhancement]: Add ability for the YARR JIT to
properly handle nested expressions that can match
without consuming characters
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: msaboff at apple.com
The YARR interpreter has a function for matching nested expressions that might not consume characters. This is needed when we try to match containing parenthesis which have variable counts, but their contents match an empty string. An example regex is /(a*)*x/. When we use this regex to match "aa", we'll match the "aa" via the parenthesis sub pattern and then fail trying to match the 'x'. Then we'll backtrack. The (a*)* subexpression will match a zero length string and try match the 'x'. We have now entered an infinite loop that only exits due to exceeding the loop try count. In the case where the parenthesis has a variable count, the interpreter will make sure that each time we try matching the parenthesis contents, we make sure we actually consumes characters. This is done in the interpreter with the function matchNonZeroDisjunction(). The JIT should emit the same kind of logic.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190815/1e05f68c/attachment.html>
More information about the webkit-unassigned
mailing list