alexcrichton opened PR #13926 from alexcrichton:dangling-thread-fix to bytecodealliance:main:
This commit is a refactor of the
HostTask::callerfield to no longer refer to aQualifiedThreadId. This is not valid to store within aHostTaskbecause threads can exit while a host task is still running. More generally acallerfield isn't valid to store because tasks can exit without blocking on callees, but that refactoring is left for another day.Otherwise most of this commit is juggling state and moving things around now that
calleris no longer present. I've attempted to explicitly pass it around in a few places and notably delineate boundaries of tasks entering/exiting a bit more clearly in a few locations. This commit also surface WebAssembly/component-model#678 which is something we'll have to address in the future as well, and now it's got aFIXMEfor the primary location of where the chosen task to lower with is suspect.Closes #13890
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested dicej for a review on PR #13926.
alexcrichton requested wasmtime-core-reviewers for a review on PR #13926.
alexcrichton updated PR #13926.
github-actions[bot] added the label wasmtime:api on PR #13926.
:thumbs_up: dicej submitted PR review.
alexcrichton added PR #13926 Avoid dangling references to exited threads to the merge queue.
:check: alexcrichton merged PR #13926.
alexcrichton removed PR #13926 Avoid dangling references to exited threads from the merge queue.
Last updated: Jul 29 2026 at 05:03 UTC