blob: 7295deded92bb633a0b6a4e25184d26ba7efd7c9 [file] [log] [blame]
//@ requireOptions("--disableOptionsFreezingForTesting")
//@ skip if $hostOS != "darwin" or $architecture != "x86-64"
function foo() {
class C {
constructor(func) {
this.func = func;
}
runTest() {
this.func();
}
}
function recurseAndTest() {
try {
recurseAndTest();
test.runTest();
} catch (e) {
}
}
const howManyParentheses = 1000;
const deepRE = new RegExp('('.repeat(howManyParentheses) + ')'.repeat(howManyParentheses));
let test =
new C(() => {
deepRE.exec('');
});
recurseAndTest();
}
$vm.callWithStackSize(foo, 100*1024)