WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
267011
[JSC] RegExp /u flag doesn't respect atomicity of surrogate pairs
https://bugs.webkit.org/show_bug.cgi?id=267011
Summary
[JSC] RegExp /u flag doesn't respect atomicity of surrogate pairs
Alexey Shvayka
Reported
2024-01-02 16:19:44 PST
Simple test case: /\uDC9A$/u.exec("a💚") // \uDC9A being a trailing surrogate of 💚 Expected: null Actual: matches \uDC9A The bug is observed in both JIT and Interpreter, anywhere we match characters (another good example is negated character classes). Current logic allows us to end up in-between trailing and leading surrogate, producing false matches. Related test262 failures: * test/built-ins/RegExp/prototype/Symbol.search/u-lastindex-advance.js * test/built-ins/RegExp/prototype/Symbol.split/u-lastindex-adv-thru-failure.js * test/built-ins/RegExp/prototype/exec/u-lastindex-adv.js * test/language/literals/regexp/u-astral-char-class-invert.js
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-01-02 16:20:01 PST
<
rdar://problem/120391451
>
Michael Saboff
Comment 2
2024-01-10 16:48:24 PST
Pull request:
https://github.com/WebKit/WebKit/pull/22631
EWS
Comment 3
2024-01-11 11:17:40 PST
Committed
272928@main
(584a9a820ab2): <
https://commits.webkit.org/272928@main
> Reviewed commits have been landed. Closing PR #22631 and removing active labels.
Alexey Shvayka
Comment 4
2024-01-12 07:58:25 PST
***
Bug 205477
has been marked as a duplicate of this bug. ***
Michael Saboff
Comment 5
2024-01-16 10:36:44 PST
The fix in
272928@main
regressed performance in JetStream2 / UniPoker. Rolling this out to address the performance regression.
Michael Saboff
Comment 6
2024-01-16 11:16:04 PST
Fix with performance regression reverted in
273081@main
(9d426c6ff391): <
https://commits.webkit.org/273081@main
>
Brent Fulgham
Comment 7
2024-03-07 10:04:29 PST
This is now being tracked as: <
rdar://124217243
>
Michael Saboff
Comment 8
2024-03-12 13:47:13 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/25793
EWS
Comment 9
2024-03-13 09:47:04 PDT
Committed
276031@main
(67969c218ddf): <
https://commits.webkit.org/276031@main
> Reviewed commits have been landed. Closing PR #25793 and removing active labels.
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