Skip to content

Conversation

@alexcrichton
Copy link
Member

This commit updates the implementation of compiling array-to-wasm trampolines for component intrinsics to reuse the exact same implementation as core wasm uses. This fixes an issue where the component trampolines were not updated as part of #11592 to have a try/catch for errors that happen during their execution.

The implementation here is intended to be a small, backportable, patch to the 38.0.x release branch. This does not refactor, for example, TrampolineCompiler which now always uses the Wasm ABI as opposed to using either the wasm or array ABI. Such cleanup is left for a follow-up PR to main after this one.

In the meantime though the implementation of array-ABI component model intrinsics now looks exactly like array-to-wasm trampolines for core wasm where the array-ABI function performs a try_call to the wasm-ABI function, letting the wasm-ABI function doing the actual work. This is a nice simplification for trampolines where the definition of the trampoline is now just in one function instead of duplicated across two.

This commit updates the implementation of compiling array-to-wasm
trampolines for component intrinsics to reuse the exact same
implementation as core wasm uses. This fixes an issue where the
component trampolines were not updated as part of bytecodealliance#11592 to have a
try/catch for errors that happen during their execution.

The implementation here is intended to be a small, backportable, patch
to the 38.0.x release branch. This does not refactor, for example,
`TrampolineCompiler` which now always uses the `Wasm` ABI as opposed to
using either the wasm or array ABI. Such cleanup is left for a follow-up
PR to `main` after this one.

In the meantime though the implementation of array-ABI component model
intrinsics now looks exactly like array-to-wasm trampolines for core
wasm where the array-ABI function performs a `try_call` to the wasm-ABI
function, letting the wasm-ABI function doing the actual work. This is a
nice simplification for trampolines where the definition of the
trampoline is now just in one function instead of duplicated across two.
@alexcrichton alexcrichton requested review from a team as code owners October 24, 2025 15:30
@alexcrichton alexcrichton requested review from cfallin and fitzgen and removed request for a team October 24, 2025 15:30
@alexcrichton alexcrichton enabled auto-merge (squash) October 24, 2025 16:55
@alexcrichton alexcrichton disabled auto-merge October 24, 2025 21:07
@alexcrichton alexcrichton merged commit c3d448c into bytecodealliance:release-38.0.0 Oct 24, 2025
170 checks passed
@alexcrichton alexcrichton deleted the ghsa-38 branch October 24, 2025 21:07
@alexcrichton
Copy link
Member Author

Merging as @fitzgen pre-reviewed this and I suspect folks are otherwise busy in meetings most of today or such.

@fitzgen
Copy link
Member

fitzgen commented Oct 24, 2025

(Yes, lots of meetings today, apologies!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants