From 59203c63bb777a3bacec32fb8830fba33540e809 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:35:29 +0200 Subject: Adding upstream version 127.0. Signed-off-by: Daniel Baumann --- .../jit-test/tests/wasm/tail-calls/bug1891422.js | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 js/src/jit-test/tests/wasm/tail-calls/bug1891422.js (limited to 'js/src/jit-test/tests/wasm/tail-calls/bug1891422.js') diff --git a/js/src/jit-test/tests/wasm/tail-calls/bug1891422.js b/js/src/jit-test/tests/wasm/tail-calls/bug1891422.js new file mode 100644 index 0000000000..c5c43d006f --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/bug1891422.js @@ -0,0 +1,27 @@ +// |jit-test| --more-compartments; skip-variant-if: --setpref=wasm_test_serialization=true, true; skip-variant-if: --wasm-compiler=ion, true + +a = newGlobal({ newCompartment: true }); +a.b = this; +a.eval(`Debugger(b).onExceptionUnwind = function () {};`); + +var ins0 = wasmEvalText(`(module + (func $fac-acc (export "e") (param i64 i64) + unreachable + ) +)`); +var ins = wasmEvalText(`(module + (import "" "e" (func $fac-acc (param i64 i64))) + (type $tz (func (param i64))) + (table $t 1 1 funcref) + (func $f (export "fac") (param i64) + local.get 0 + i32.const 0 + return_call_indirect $t (type $tz) + ) + (elem $t (i32.const 0) $fac-acc) +)`, {"": {e: ins0.exports.e}}); + + +assertErrorMessage(() => { + ins.exports.fac(5n); +}, WebAssembly.RuntimeError, /indirect call signature mismatch/); -- cgit v1.2.3