summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/wasm/regress/null-call.js
blob: b7ed4b46e3a07195e33392c126e42012c331776a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Bug 1747540 - two trap descriptors at the same address led to some confusion.

var ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(`
  (table 1 funcref)
  (memory 1)
  (func $test (export "test") (result i32)
    (call_indirect (i32.const 0))
    (i32.load (i32.const 0))
)
`)))
assertErrorMessage(() => ins.exports.test(),
                   WebAssembly.RuntimeError,
                   /indirect call to null/);