alexcrichton assigned alexcrichton to issue #12544.
alexcrichton added the wasm-proposal:component-model-async label to Issue #12544.
alexcrichton opened issue #12544:
This input:
(component (component $a (core module $m (func (export "a") (result i32) i32.const 1) ;; CALLBACK_CODE_YIELD (func (export "cb") (param i32 i32 i32) (result i32) i32.const 1) ;; CALLBACK_CODE_YIELD ) (core instance $i (instantiate $m)) (func (export "f") async (canon lift (core func $i "a") async (callback (func $i "cb")))) ) (component $b (import "f" (func $f async)) (core module $m (import "" "f" (func $f (result i32))) (import "" "cancel" (func $cancel (param i32) (result i32))) (global $subtask (mut i32) (i32.const 0)) (func (export "a") (global.set $subtask (i32.shr_u (call $f) (i32.const 4)))) (func (export "b") (drop (call $cancel (global.get $subtask)))) ) (core func $f (canon lower (func $f) async)) (core func $cancel (canon subtask.cancel)) (core instance $i (instantiate $m (with "" (instance (export "f" (func $f)) (export "cancel" (func $cancel)) )) )) (func (export "a") async (canon lift (core func $i "a"))) (func (export "b") async (canon lift (core func $i "b"))) ) (instance $a (instantiate $a)) (instance $b (instantiate $b (with "f" (func $a "f")))) (export "a" (func $b "a")) (export "b" (func $b "b")) ) (assert_return (invoke "a")) (assert_return (invoke "b"))fails with:
$ cargo run wast foo.wast -Wcomponent-model-async Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.10s Running `target/debug/wasmtime wast foo.wast -Wcomponent-model-async` thread 'main' (2592575) panicked at crates/wasmtime/src/runtime/component/concurrent.rs:3461:17: internal error: entered unreachable code note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
alexcrichton closed issue #12544:
This input:
(component (component $a (core module $m (func (export "a") (result i32) i32.const 1) ;; CALLBACK_CODE_YIELD (func (export "cb") (param i32 i32 i32) (result i32) i32.const 1) ;; CALLBACK_CODE_YIELD ) (core instance $i (instantiate $m)) (func (export "f") async (canon lift (core func $i "a") async (callback (func $i "cb")))) ) (component $b (import "f" (func $f async)) (core module $m (import "" "f" (func $f (result i32))) (import "" "cancel" (func $cancel (param i32) (result i32))) (global $subtask (mut i32) (i32.const 0)) (func (export "a") (global.set $subtask (i32.shr_u (call $f) (i32.const 4)))) (func (export "b") (drop (call $cancel (global.get $subtask)))) ) (core func $f (canon lower (func $f) async)) (core func $cancel (canon subtask.cancel)) (core instance $i (instantiate $m (with "" (instance (export "f" (func $f)) (export "cancel" (func $cancel)) )) )) (func (export "a") async (canon lift (core func $i "a"))) (func (export "b") async (canon lift (core func $i "b"))) ) (instance $a (instantiate $a)) (instance $b (instantiate $b (with "f" (func $a "f")))) (export "a" (func $b "a")) (export "b" (func $b "b")) ) (assert_return (invoke "a")) (assert_return (invoke "b"))fails with:
$ cargo run wast foo.wast -Wcomponent-model-async Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.10s Running `target/debug/wasmtime wast foo.wast -Wcomponent-model-async` thread 'main' (2592575) panicked at crates/wasmtime/src/runtime/component/concurrent.rs:3461:17: internal error: entered unreachable code note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Last updated: Feb 24 2026 at 04:36 UTC