Stream: git-wasmtime

Topic: wasmtime / PR #13054 Fix swapped arguments in ThreadNewIn...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 11 2026 at 06:41):

shumbo opened PR #13054 from shumbo:fix-thread-new-indirect-arg-swap to bytecodealliance:main:

Summary

Details

The bug was invisible in the common single-table case where both indices are 0. With multiple tables, the swapped indices cause the runtime to look up a function in the wrong table instead of trapping.

Affected code: crates/cranelift/src/compiler/component.rs, lines 768-769

The fix swaps the two params.push calls to match the expected parameter order in the thread_new_indirect host function signature defined in crates/environ/src/component.rs.

Test plan

view this post on Zulip Wasmtime GitHub notifications bot (Apr 11 2026 at 06:41):

shumbo requested alexcrichton for a review on PR #13054.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 11 2026 at 06:41):

shumbo requested wasmtime-core-reviewers for a review on PR #13054.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 11 2026 at 06:41):

shumbo requested wasmtime-compiler-reviewers for a review on PR #13054.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 11 2026 at 06:43):

shumbo edited PR #13054:

Summary

Details

The bug was invisible in the common single-table case where both indices are 0. With multiple tables, the swapped indices cause the runtime to look up a function in the wrong table instead of trapping.

The fix swaps the two params.push calls to match the expected parameter order in the thread_new_indirect host function signature defined in crates/environ/src/component.rs.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 11 2026 at 06:50):

shumbo updated PR #13054.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 11 2026 at 07:23):

shumbo updated PR #13054.


Last updated: Apr 12 2026 at 23:10 UTC