Stream: git-wasmtime

Topic: wasmtime / PR #14549 Don't propagate `ThrownException` wi...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 18:36):

alexcrichton opened PR #14549 from alexcrichton:catch-more-excpetions to bytecodealliance:main:

This commit updates logic to handle the ThrownException built-in-error type when processing an otherwise-uncaught exception. Previously this had no special handling w.r.t. components and a consequence of that was that natural ?-style error propagation would "leak" exceptions across component boundaries. Components are intended to convert any uncaught exceptions into traps at component boundaries, but due to this ?-propagation it wasn't actually correctly implemented in a number of locations.

Some of the new tests added in this commit are examples of where these uncaught exceptions where ?-propagated across components. One example is that when a component calls task.return and then that calls realloc and then that throws an exception. Previously that was propagated through ? meaning that an exception thrown by the callee naturally transitioned into the caller across the component boundary.

The fix in this commit is intended to make ?-style propagation work-by-default with components. Namely uncaught exceptions are internally turned into Trap::UncaughtException instead of propagating as a ThrownException. This is done by annotating call-sites with what behavior is desired, where core wasm entrypoints propagate ThrownException and component entrypoints all turn it into a trap.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.md

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 18:36):

alexcrichton requested dicej for a review on PR #14549.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 18:36):

alexcrichton requested wasmtime-core-reviewers for a review on PR #14549.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 18:39):

alexcrichton updated PR #14549.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 18:53):

alexcrichton updated PR #14549.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 19:53):

github-actions[bot] added the label wasmtime:api on PR #14549.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 20:19):

:thumbs_up: dicej submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 20:27):

alexcrichton added PR #14549 Don't propagate ThrownException with components to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 20:44):

github-merge-queue[bot] removed PR #14549 Don't propagate ThrownException with components from the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 21:47):

alexcrichton added PR #14549 Don't propagate ThrownException with components to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 22:47):

:check: alexcrichton merged PR #14549.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 22:47):

alexcrichton removed PR #14549 Don't propagate ThrownException with components from the merge queue.


Last updated: Oct 11 2026 at 04:10 UTC