Title: [294595] trunk/JSTests/stress/regexp-bol-optimize-out-of-stack.js
- Revision
- 294595
- Author
- commit-qu...@webkit.org
- Date
- 2022-05-20 17:10:35 -0700 (Fri, 20 May 2022)
Log Message
Reduce array length for memory limited scenarios in regexp-bol-optimize-out-of-stack.js
https://bugs.webkit.org/show_bug.cgi?id=240717
Patch by Xan López <x...@igalia.com> on 2022-05-20
Reviewed by Yusuke Suzuki.
* stress/regexp-bol-optimize-out-of-stack.js: use a smaller array size when memory is limited.
(test):
Canonical link: https://commits.webkit.org/250826@main
Modified Paths
Diff
Modified: trunk/JSTests/stress/regexp-bol-optimize-out-of-stack.js (294594 => 294595)
--- trunk/JSTests/stress/regexp-bol-optimize-out-of-stack.js 2022-05-21 00:06:37 UTC (rev 294594)
+++ trunk/JSTests/stress/regexp-bol-optimize-out-of-stack.js 2022-05-21 00:10:35 UTC (rev 294595)
@@ -1,10 +1,13 @@
// This test that the beginning of line (bol) optimization throws when we run out of stack space.
+//@ requireOptions("-e", "let arrayLength=25000") if $memoryLimited
+arrayLength = typeof(arrayLength) === 'undefined' ? 50000 : arrayLength;
+
let expectedException = "SyntaxError: Invalid regular _expression_: regular _expression_ too large";
function test()
{
- let source = Array(50000).join("(") + /(?:^|:|,)(?:\s*\[)+/g.toString() + Array(50000).join(")");
+ let source = Array(arrayLength).join("(") + /(?:^|:|,)(?:\s*\[)+/g.toString() + Array(arrayLength).join(")");
RegExp(source);
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes