blob: 55406c63bef33370edea3b128526efc8253d7f04 [file] [edit]
;; NOTE: Assertions have been generated by update_lit_checks.py --output=fuzz-exec and should not be edited.
;; RUN: foreach %s %t wasm-opt -all --fuzz-exec-before -q -o /dev/null 2>&1 | filecheck %s
;; Resume a continuation from the start function. It should execute without
;; error.
(module
(type $void (func))
(type $void_cont (cont $void))
(type $i32_pair (func (param i32 i32)))
(import "fuzzing-support" "call-export" (func $call_export (type $i32_pair) (param i32 i32)))
(tag $susp_tag (type $void))
(start $start)
;; CHECK: [fuzz-exec] export nop
(func $nop (export "nop") (type $void)
(nop)
)
(func $start (type $void)
(drop
(block $handler (result (ref $void_cont))
(resume $void_cont (on $susp_tag $handler)
(cont.new $void_cont
(ref.func $nop)
)
)
(return)
)
)
)
;; CHECK: [fuzz-exec] export export
;; CHECK-NEXT: [fuzz-exec] note result: export => 42
(func $export (export "export") (result i32)
;; An export to be called later, proving we did not trap during start.
(i32.const 42)
)
)