Bug 276306
Summary: | [JSC] RegExp range quantifier should allow 2^53 - 1 | ||
---|---|---|---|
Product: | WebKit | Reporter: | Sosuke Suzuki <aosukeke> |
Component: | JavaScriptCore | Assignee: | 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
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
Pull request: https://github.com/WebKit/WebKit/pull/30559
EWS
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
<rdar://problem/131710011>
Alexey Shvayka
*** Bug 209573 has been marked as a duplicate of this bug. ***