Bug 223498

Summary: [YARR] Interpreter incorrectly matches non-BMP characters with multiple .
Product: WebKit Reporter: Michael Saboff <msaboff>
Component: JavaScriptCoreAssignee: Michael Saboff <msaboff>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, keith_miller, mark.lam, saam, tzagallo, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
mark.lam: review+, ews-feeder: commit-queue-
Updated patch to fix layout test ysuzuki: review+, ews-feeder: commit-queue-

Michael Saboff
Reported 2021-03-18 21:03:09 PDT
Consider the expression: let m = String.fromCodePoint(0x10000).match(/../u); It should not match. The . atom (any character, but newline) should match the non-BMP character U+10000 leaving the second . nothing to match causing the whole RegExp to fail. The Yarr JIT properly processes the RegExp, but the Yarr interpreter erroneously matches.
Attachments
Patch (3.32 KB, patch)
2021-03-19 09:36 PDT, Michael Saboff
mark.lam: review+
ews-feeder: commit-queue-
Updated patch to fix layout test (7.09 KB, patch)
2021-03-19 12:59 PDT, Michael Saboff
ysuzuki: review+
ews-feeder: commit-queue-
Michael Saboff
Comment 1 2021-03-18 21:03:45 PDT
Michael Saboff
Comment 2 2021-03-19 09:36:39 PDT
Michael Saboff
Comment 3 2021-03-19 12:59:52 PDT
Created attachment 423764 [details] Updated patch to fix layout test
Yusuke Suzuki
Comment 4 2021-03-19 13:59:06 PDT
Comment on attachment 423764 [details] Updated patch to fix layout test r=me
Michael Saboff
Comment 5 2021-03-22 15:08:45 PDT
Note You need to log in before you can comment on or make changes to this bug.