Stream: git-wasmtime

Topic: wasmtime / PR #12930 winch: Fix spectre-related table ind...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 01 2026 at 14:46):

alexcrichton opened PR #12930 from alexcrichton:winch-spectre-fix to bytecodealliance:main:

This commit fixes a minor issue in the Winch backend when loading a value from a table when spectre mitigations are enabled. In this situation an extra comparison and conditional move is executed after the original bounds check and load to specifically handle the speculation case and ensure that out-of-bounds values can't be speculated on. The comparison performed on this path, however, was an incorrect one where it unconditionally used a 32-bit comparison. The comparison instead needs to use bound_size to handle platform/table differences. This matches the actual bounds check, for example, which occurs prior to the spectre-related mitigation.

<!--
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 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 (Apr 01 2026 at 14:46):

alexcrichton requested cfallin for a review on PR #12930.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 01 2026 at 14:46):

alexcrichton requested wasmtime-compiler-reviewers for a review on PR #12930.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 01 2026 at 14:46):

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

view this post on Zulip Wasmtime GitHub notifications bot (Apr 01 2026 at 16:21):

saulecabrera submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 01 2026 at 16:21):

saulecabrera added PR #12930 winch: Fix spectre-related table indexing comparison size to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 01 2026 at 16:47):

saulecabrera merged PR #12930.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 01 2026 at 16:47):

saulecabrera removed PR #12930 winch: Fix spectre-related table indexing comparison size from the merge queue.


Last updated: Apr 12 2026 at 23:10 UTC