blob: c66f4baf2ada6482e60024311ce13ae605ba2ff8 [file] [log] [blame]
//@ slow!
//@ skip if $memoryLimited
//@ skip if $architecture != "arm64" and $architecture != "x86-64"
//@ runDefault if !$memoryLimited
var longString = "x".repeat(2 ** 30);
var arr = Array(4).fill(longString);
var exception;
try {
JSON.stringify(arr);
} catch (e) {
exception = e;
}
if (exception != "RangeError: Out of memory")
throw "FAILED";