alexcrichton opened issue #14509:
This input:
(module (type $ft (func)) (type $ct (cont $ft)) (tag $t) (func $worker (local i32) (local.set 0 (i32.const 1000)) (loop $l (br_if $l (local.tee 0 (i32.sub (local.get 0) (i32.const 1))))) (suspend $t)) (elem declare func $worker) (func (export "run") (local $n i32) (local.set $n (i32.const 1000)) (loop $outer (block $h (result (ref $ct)) (resume $ct (on $t $h) (cont.new $ct (ref.func $worker))) (unreachable)) drop (br_if $outer (local.tee $n (i32.sub (local.get $n) (i32.const 1))))))) (assert_trap (invoke "run") "all fuel consumed")currently fails with limited fuel:
$ wasmtime wast -W stack-switching,fuel=100000 repro.wast Error: failed to run script file 'repro.wast' Caused by: 0: failed directive on repro.wast:26 1: expected trap, got Core([])however this executees a significantly larger number of instructions w.r.t. the fuel consumed.
cc @dhil, this is simliar to the fix for 922a92d281
alexcrichton added the wasm-proposal:stack-switching label to Issue #14509.
alexcrichton added the wasmtime:fuel label to Issue #14509.
alexcrichton added the bug label to Issue #14509.
Last updated: Oct 11 2026 at 04:10 UTC