#14459·wasmtime

组件模型的异步运行时可能会删除仍然存在的子任务句柄

作者: dicej创建于 2026年9月30日更新于 2026年9月30日

The Compponent Model async runtime in Wasmtime models guest tasks using the `GuestTask` struct, which has an associated `ready_to_delete` function to determine whether it can be safely removed from the table and dropped. However, that function does not currently take into account whether the guest has received and not yet dropped a handle to that task, which means it may be deleted before that handle is dropped, resulting in a `resource not present` trap when the guest handle is finally dropped. The following test case produces such an outcome:

内容来源: bytecodealliance/wasmtime