saulecabrera opened PR #8059 from saulecabrera:winch-use-index-offset-and-access-for-bounds-checks
to bytecodealliance:main
:
This commit fixes the bounds check comparison for dynamic heaps. The previous implementation wasn't using the right value: for the general case of dynamic heaps, we want to compare if
index + offset + access_size > bounds
But it was only comparing
index > bounds
This commit addresses the issue by adding a new temporary register into the equation which will be used for the bounds check comparison and for overflow checks. This approach is preferred over using the scratch register because it's harder to know when the scratch register might get clobbered (in the case of spectre checks, it could for example)
<!--
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
-->
saulecabrera requested fitzgen for a review on PR #8059.
saulecabrera requested wasmtime-compiler-reviewers for a review on PR #8059.
saulecabrera requested wasmtime-core-reviewers for a review on PR #8059.
github-actions[bot] commented on PR #8059:
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>
fitzgen submitted PR review.
fitzgen commented on PR #8059:
Thanks!
fitzgen merged PR #8059.
Last updated: Dec 23 2024 at 12:05 UTC