summaryrefslogtreecommitdiff
path: root/test/ctor-eval/bad-indirect-call.wast
blob: 9ef091ad3c332fbf8ed7526d09b8cf6456b373e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
(module
  (type $v (func))
  (memory 256 256)
  (data (i32.const 10) "waka waka waka waka waka")
  (table 1 1 funcref)
  (elem (i32.const 0) $call-indirect)
  (export "test1" (func $test1))
  (func $test1
    (call_indirect (type $v) (i32.const 1)) ;; unsafe to call, out of range
    (i32.store8 (i32.const 20) (i32.const 120))
  )
  (func $call-indirect
    (i32.store8 (i32.const 40) (i32.const 67))
  )
)