alexcrichton opened PR #13871 from alexcrichton:more-hooks to bytecodealliance:main:
This commit fixes two (known) issues with call hooks. The first is a long-standing issue where when Wasmtime yielded due to fuel or epochs the call hooks were not invoked. If hosts were using call hooks to track time executed in a guest, for example, then that would lead to inaccuracies. The second is with component-model-async fiber switches weren't correctly accounted for in terms of the call hook machinery which could lead results to get mixed up.
The fix for both here is the same which is to sink the invocation of call hooks far down into the stack such that they cannot be forgotten when the guest exits to the host. This moves manual invocations, for example, on host functions to instead one central location that handles both host functions and libcalls.
Closes #13870
<!--
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 #13871.
alexcrichton requested wasmtime-core-reviewers for a review on PR #13871.
github-actions[bot] added the label wasmtime:api on PR #13871.
:thumbs_up: dicej submitted PR review.
alexcrichton added PR #13871 Fix call hooks with yields and concurrent execution to the merge queue.
:check: alexcrichton merged PR #13871.
alexcrichton removed PR #13871 Fix call hooks with yields and concurrent execution from the merge queue.
Last updated: Jul 29 2026 at 05:03 UTC