From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- .../jit-test/tests/bug1782562-toSource-veclen.js | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 js/src/jit-test/tests/bug1782562-toSource-veclen.js (limited to 'js/src/jit-test/tests/bug1782562-toSource-veclen.js') diff --git a/js/src/jit-test/tests/bug1782562-toSource-veclen.js b/js/src/jit-test/tests/bug1782562-toSource-veclen.js new file mode 100644 index 0000000000..21b885193b --- /dev/null +++ b/js/src/jit-test/tests/bug1782562-toSource-veclen.js @@ -0,0 +1,32 @@ +// |jit-test| skip-if: getBuildConfiguration()["android"] + +try { + var z = "1"; + try { + f = function (x) { + (function(){}); + (function(){}); + (function(){}); + (function(){}); + (function(){}); + (function(){}); + (function(){}); + (function(){}); + (function(){}); + (function(){}); + (function(){}); + (function(){}); + (function(){}); + (function(){}); + (function(){}); + (function(){}); + }; + for (let i = 0; i < 99; i++) + z += z + } catch (e) {} + uneval(this); + assertEq(getBuildConfiguration()["pointer-byte-size"], 8, "32-bit should OOM; 64-bit should not"); +} catch (e) { + const msg = e + ""; + assertEq(msg.includes("out of memory") || msg.includes("InternalError: allocation size overflow"), true); +} -- cgit v1.2.3