WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
276306
[JSC] RegExp range quantifier should allow 2^53 - 1
https://bugs.webkit.org/show_bug.cgi?id=276306
Summary
[JSC] RegExp range quantifier should allow 2^53 - 1
Sosuke Suzuki
Reported
2024-07-08 00:57:05 PDT
According to the spec[1][2], the range quantifier (/a{n,m}/) allows values for n and m up to 2^53 - 1. However, the current JSC does not allow numbers larger than UINT_MAX, so it throws a SyntaxError: ``` new RegExp("a{9007199254740991}", "u"); // SyntaxError: Invalid regular expression: number too large in {} quantifier related test262:
https://github.com/tc39/test262/blob/3a7a72aef5009eb22117231d40f9a5a66a9a595a/test/built-ins/RegExp/quantifier-integer-limit.js
[1]:
https://tc39.es/ecma262/#prod-QuantifierPrefix
[2]:
https://tc39.es/ecma262/#prod-DecimalDigits
Attachments
Add attachment
proposed patch, testcase, etc.
Sosuke Suzuki
Comment 1
2024-07-08 02:17:24 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/30559
EWS
Comment 2
2024-07-14 11:05:07 PDT
Committed
280953@main
(712efd266cc9): <
https://commits.webkit.org/280953@main
> Reviewed commits have been landed. Closing PR #30559 and removing active labels.
Radar WebKit Bug Importer
Comment 3
2024-07-14 11:06:15 PDT
<
rdar://problem/131710011
>
Alexey Shvayka
Comment 4
2024-07-14 18:03:45 PDT
***
Bug 209573
has been marked as a duplicate of this bug. ***
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