Stream: git-wasmtime

Topic: wasmtime / PR #8059 winch: Fix the bounds check for dynam...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2024 at 13:37):

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:

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 (Mar 07 2024 at 13:37):

saulecabrera requested fitzgen for a review on PR #8059.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2024 at 13:37):

saulecabrera requested wasmtime-compiler-reviewers for a review on PR #8059.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2024 at 13:37):

saulecabrera requested wasmtime-core-reviewers for a review on PR #8059.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2024 at 15:44):

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:

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 (Mar 07 2024 at 16:16):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2024 at 16:16):

fitzgen commented on PR #8059:

Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2024 at 16:41):

fitzgen merged PR #8059.


Last updated: Dec 23 2024 at 12:05 UTC