summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/wasm/regress/bug1891658.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/wasm/regress/bug1891658.js')
-rw-r--r--js/src/jit-test/tests/wasm/regress/bug1891658.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/wasm/regress/bug1891658.js b/js/src/jit-test/tests/wasm/regress/bug1891658.js
new file mode 100644
index 0000000000..304ea0f5ea
--- /dev/null
+++ b/js/src/jit-test/tests/wasm/regress/bug1891658.js
@@ -0,0 +1,10 @@
+// Tests OOM during wasmLosslessInvoke.
+
+var ins = wasmEvalText('(module (func (export "f")(result i32) i32.const 1))');
+
+oomAtAllocation(1);
+try {
+ wasmLosslessInvoke(ins.exports.f);
+} catch (e) {
+ assertEq(e, "out of memory");
+}