diff options
Diffstat (limited to 'js/src/jit-test/tests/wasm/gc/regress-1745391.js')
-rw-r--r-- | js/src/jit-test/tests/wasm/gc/regress-1745391.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/wasm/gc/regress-1745391.js b/js/src/jit-test/tests/wasm/gc/regress-1745391.js new file mode 100644 index 0000000000..5ea8989d3e --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/regress-1745391.js @@ -0,0 +1,13 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +let { createDefault } = wasmEvalText(` + (module (type $a (array (mut i32))) + (func (export "createDefault") (param i32) (result eqref) + local.get 0 + array.new_default $a + ) + ) +`).exports; +for (len = -1; len > -100; len--) { + assertErrorMessage(() => createDefault(len), WebAssembly.RuntimeError, /too many array elements/); +} |