Bug 127177
| Summary: | Yarr interpreter reports non-match instead of throwing when bailing out | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Till Schneidereit <till> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | bzbarsky |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | https://bugzilla.mozilla.org/show_bug.cgi?id=953013 | ||
Till Schneidereit
The Yarr interpreter contains a limit on how many attempts are made to match disjunctions. When this limit is reached, a bailout with JSRegExpErrorHitLimit happens. This bubbles up and is returned as the result of JSC::Yarr::interpret, the caller of which treats it the same as JSRegExpNoMatch.
In SpiderMonkey, we changed things to throw an exception in this case; see the patch in the linked bug.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Boris Zbarsky
Note that this leads to incorrect behavior in Safari. For example:
/^a(\w+)+b/.test("axbxxxxxxxxxxxxxxxxxxxx")
returns false in Safari, whereas the correct value is true. Chrome gets this right.