| ;; 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 |
| |
| ;; A start function suspends to the host. This is an unhandled suspend in the |
| ;; start function, which should trap and not leave a stale continuation on the |
| ;; stack (which would cause subsequent assertions to fail). |
| |
| (module |
| ;; CHECK: [trap unhandled suspend in start function] |
| (type $void_func (func)) |
| (type $cont (cont $void_func)) |
| |
| (tag $tag_suspend (type $void_func)) |
| |
| (start $start) |
| |
| (func $start |
| (local $c (ref $cont)) |
| (local.set $c (cont.new $cont (ref.func $suspending_func))) |
| (resume $cont (local.get $c)) |
| ) |
| |
| (func $suspending_func |
| (suspend $tag_suspend) |
| ) |
| |
| (func $run (export "run") |
| ;; Another function, to show that the trap during start does not get here. |
| ) |
| ) |
| |