summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/wasm/gc/regress-1745391.js
blob: 5ea8989d3e412359603096bd9e3327be57909d82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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/);
}