summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/wasm/gc/regress-1884767.js
blob: 54a168d65763a7bce7ebe636a05b449e146a8711 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// |jit-test| skip-if: !wasmGcEnabled()

const { test } = wasmEvalText(`(module
  (type $a (array i32))
  (func (export "test") (result anyref)
    try (result anyref)
      (array.new_default $a (i32.const 999999999))
    catch_all
      unreachable
    end
  )
)`).exports;
assertErrorMessage(() => test(), WebAssembly.RuntimeError, /too many array elements/);