WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
195970
[Yarr Interpreter] The interpreter doesn't have checks for stack overflow due to deep recursion
https://bugs.webkit.org/show_bug.cgi?id=195970
Summary
[Yarr Interpreter] The interpreter doesn't have checks for stack overflow due...
Michael Saboff
Reported
2019-03-19 15:54:16 PDT
RegExp patterns can be nested deep via parentheses, e.g. (((((((((((x))))))))))). The parsing and compiling of such a pattern as well as the processing by the JIT and interpreter uses recursion. For deeply nested pattern or patterns that as process when called from an already deep stack, we can exceed the available stack space. The pattern parse / compilation paths are already handled. The JIT compilation paths are being tracked in <
https://bugs.webkit.org/show_bug.cgi?id=195906
> "JSC test crash: stress/dont-strength-reduce-regexp-with-compile-error.js.default". This bug is for the interpreter, specifically recursion of Yarr::Interpreter::matchDisjunction(). There currently isn't a test case that produces a crash from the interpreter, but code inspection shows that there aren't any "is it safe to recurse?" checks. It could be the case that it takes a deeper stack to pasrse / compile a pattern than it does to interpret it.
Attachments
Add attachment
proposed patch, testcase, etc.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug