summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/wasm/tail-calls/bug1871606.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/wasm/tail-calls/bug1871606.js')
-rw-r--r--js/src/jit-test/tests/wasm/tail-calls/bug1871606.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/wasm/tail-calls/bug1871606.js b/js/src/jit-test/tests/wasm/tail-calls/bug1871606.js
new file mode 100644
index 0000000000..aa520d1f53
--- /dev/null
+++ b/js/src/jit-test/tests/wasm/tail-calls/bug1871606.js
@@ -0,0 +1,22 @@
+// |jit-test| --more-compartments; skip-variant-if: --wasm-test-serialization, true; skip-variant-if: --wasm-compiler=ion, true
+dbg = newGlobal();
+dbg.b = this;
+dbg.eval("(" + function() {
+ Debugger(b)
+} + ")()");
+var ins = wasmEvalText(`
+ (table 1 funcref)
+ (type $d (func (param f64)))
+ (func $e
+ (export "test")
+ f64.const 0.0
+ i32.const 0
+ return_call_indirect (type $d)
+ )
+ (elem (i32.const 0) $e)
+`);
+
+assertErrorMessage(
+ () => ins.exports.test(),
+ WebAssembly.RuntimeError, /indirect call signature mismatch/
+);