summaryrefslogtreecommitdiff
path: root/test/interp/trap-with-callstack.txt
blob: f3391ec851b2764bdd63dd1ed6bfcb2f5c86b4de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
;;; TOOL: run-interp
(module
  (func $trap
    i32.const 1
    i32.const 0
    i32.div_s
    drop)

  (func $f 
    call $trap)
  (func $g 
    call $f)
  (func (export "h") 
    call $g)

  ;; this function should run properly, even after h traps.
  (func (export "i") (result i32)
    i32.const 22))
(;; STDOUT ;;;
h() => error: integer divide by zero
i() => i32:22
;;; STDOUT ;;)