Stream: git-wasmtime

Topic: wasmtime / PR #11973 Fix bounds-check elision with 4 GiB ...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 03 2025 at 22:12):

sunfishcode opened PR #11973 from sunfishcode:sunfishcode/bounds-check to bytecodealliance:main:

First, this fixes the can_elide_bounds_check function to consider the guard size when determining whether all 32 bits of a 32-bit index space will be at least reserved. This allows configurations which use 4 GiB guard regions with smaller memory reservations to benefit from bounds check eliding.

Second, this fixes a subtract overflow in bounds_check_field_access when the offset is greater than the memory reservation size. In this case, optimization isn't important because the code can only ever trap, so the change here is just to avoid panicking in the compiler.

<!--
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 (Nov 03 2025 at 22:12):

sunfishcode requested alexcrichton for a review on PR #11973.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 03 2025 at 22:12):

sunfishcode requested wasmtime-core-reviewers for a review on PR #11973.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 03 2025 at 22:12):

sunfishcode requested wasmtime-compiler-reviewers for a review on PR #11973.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2025 at 00:49):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2025 at 01:45):

sunfishcode updated PR #11973.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2025 at 02:18):

sunfishcode updated PR #11973.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2025 at 02:32):

sunfishcode updated PR #11973.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2025 at 02:32):

sunfishcode commented on PR #11973:

This patch exposed winch to more bounds-check-elision cases than it had been exposed to before, so I had to make some more substantial winch changes.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2025 at 02:45):

sunfishcode requested alexcrichton for a review on PR #11973.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2025 at 04:46):

github-actions[bot] commented on PR #11973:

Subscribe to Label Action

cc @saulecabrera

<details>
This issue or pull request has been labeled: "winch"

Thus the following users have been cc'd because of the following labels:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2025 at 19:43):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2025 at 20:18):

alexcrichton merged PR #11973.


Last updated: Dec 06 2025 at 06:05 UTC