haraldh opened PR #5063 from fix_validate_atomic_addr
to main
:
Apparently
addr
is a pointer to real memory.Signed-off-by: Harald Hoyer <harald@profian.com>
<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
abrown submitted PR review.
abrown submitted PR review.
abrown created PR review comment:
checked_add
?
bjorn3 submitted PR review.
bjorn3 created PR review comment:
Does this also need to account for access sizes larger than 1? For example a 8 byte access where the address is the last byte of the memory should not be allowed.
12101111 submitted PR review.
12101111 created PR review comment:
Misaligned access will trap. This check is done in JIT code: https://github.com/bytecodealliance/wasmtime/blob/32a7593c949a17f20c2a718e1cbf0d8c449b0c47/cranelift/wasm/src/code_translator.rs#L1070-L1071
bjorn3 submitted PR review.
bjorn3 created PR review comment:
That would necessitate all users of this function to trap on misalignment. Currently all callers of this function seem to immediately be followed by an unimplemented trap. Once they are implemented it is easy to miss this requirement as misaligned atomic accesses in rust are not guaranteed to panic.
haraldh updated PR #5063 from fix_validate_atomic_addr
to main
.
haraldh requested abrown for a review on PR #5063.
haraldh requested 12101111 for a review on PR #5063.
haraldh requested bjorn3 for a review on PR #5063.
haraldh requested abrown for a review on PR #5063.
12101111 submitted PR review.
12101111 created PR review comment:
.checked_add(mem.current_length())
haraldh submitted PR review.
haraldh created PR review comment:
fixed
haraldh updated PR #5063 from fix_validate_atomic_addr
to main
.
haraldh requested 12101111 for a review on PR #5063.
haraldh requested bjorn3 for a review on PR #5063.
haraldh requested 12101111 for a review on PR #5063.
12101111 submitted PR review.
haraldh closed without merge PR #5063.
Last updated: Dec 23 2024 at 13:07 UTC