Stream: git-wasmtime

Topic: wasmtime / PR #5239 Rework bounds checking for atomic ope...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 09 2022 at 23:25):

fitzgen opened PR #5239 from rework-atomic-addr-validation to main:

Before, we would do a heap_addr to translate the given Wasm memory address into a native memory address and pass it into the libcall that implemented the atomic operation, which would then treat the address as a Wasm memory address and pass it to validate_atomic_addr to be bounds checked a second time. This is a bit nonsensical, as we are validating a native memory address as if it were a Wasm memory address.

Now, we no longer do a heap_addr to translate the Wasm memory address to a native memory address. Instead, we pass the Wasm memory address to the libcall, and the libcall is responsible for doing the bounds check (by calling validate_atomic_addr with the correct type of memory address now).

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Nov 09 2022 at 23:25):

fitzgen requested abrown for a review on PR #5239.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 09 2022 at 23:25):

fitzgen requested alexcrichton for a review on PR #5239.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 10 2022 at 00:19):

abrown submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 10 2022 at 00:19):

fitzgen merged PR #5239.


Last updated: Nov 22 2024 at 16:03 UTC