Bug 276306

Summary: [JSC] RegExp range quantifier should allow 2^53 - 1
Product: WebKit Reporter: Sosuke Suzuki <aosukeke>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ashvayka, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

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
Sosuke Suzuki
Comment 1 2024-07-08 02:17:24 PDT
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
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.