[Webkit-unassigned] [Bug 276306] New: [JSC] RegExp range quantifier should allow 2^53 - 1
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jul 8 00:57:05 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=276306
Bug ID: 276306
Summary: [JSC] RegExp range quantifier should allow 2^53 - 1
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: aosukeke at gmail.com
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
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240708/7199f294/attachment.htm>
More information about the webkit-unassigned
mailing list