sunfishcode opened PR #11973 from sunfishcode:sunfishcode/bounds-check to bytecodealliance:main:
First, this fixes the
can_elide_bounds_checkfunction 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_accesswhen 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:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
sunfishcode requested alexcrichton for a review on PR #11973.
sunfishcode requested wasmtime-core-reviewers for a review on PR #11973.
sunfishcode requested wasmtime-compiler-reviewers for a review on PR #11973.
alexcrichton submitted PR review.
sunfishcode updated PR #11973.
sunfishcode updated PR #11973.
sunfishcode updated PR #11973.
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.
sunfishcode requested alexcrichton for a review on PR #11973.
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:
- saulecabrera: winch
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
alexcrichton submitted PR review.
alexcrichton merged PR #11973.
Last updated: Dec 06 2025 at 06:05 UTC