summaryrefslogtreecommitdiff
path: root/test/binary/bad-call-indirect-reserved.txt
blob: 123149fd805f6729802beefd791d3dbc2d9b4e4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
;;; TOOL: run-gen-wasm-bad
;;; ARGS1: --disable-reference-types
;;; ARGS2: --disable-reference-types
magic
version
section(TYPE) { count[1] function params[0] results[0]}
section(FUNCTION) { count[1] type[0] }
section(TABLE) { count[1] funcref flags[0] init[0] }
section(CODE) {
  count[1]
  func {
    locals[0]
    i32.const 0
    ;; The call_indirect reserved byte must be a single 0 byte. Using a long
    ;; leb128 encoding of 0 is not valid.
    call_indirect
      index[leb_i32(0)]
      reserved[0x80 0]
  }
}
(;; STDERR ;;;
0000022: error: call_indirect reserved value must be 0
0000022: error: call_indirect reserved value must be 0
;;; STDERR ;;)