blob: 6fd8563e80b35be2e96b3820b7a07bb7c6ac4783 [file] [log] [blame]
//@ if $buildType == "debug" then runFTLNoCJIT("--maxSingleAllocationSize=10000000") else skip end
function test(a) {
var x = [1337, ...a, ...a, ...a, ...a, ...a];
}
noInline(test);
function doTest(a, shouldThrow) {
var exception;
try {
test(a);
} catch (e) {
exception = e;
}
if (shouldThrow && exception != "Error: Out of memory")
throw("FAILED");
}
var a = new Array(0x40000);
doTest(a, true);