fitzgen opened PR #5335 from heap-addr-guard-pages
to main
:
Fixes #5328
FYI, I opted not to mess with or dedupe the similar logic in
cranelift-wasm
since that stuff is going to go away soon-ish when we removeheap_addr
and collect all this logic intoheap_{load,store}
. Excited to get to a point where this logic isn't spread across crates and straddling interfaces.
fitzgen requested alexcrichton for a review on PR #5335.
cfallin submitted PR review.
cfallin submitted PR review.
cfallin created PR review comment:
Is it worth a comment here on the
>=
and the0xffff_ffff
(i.e., the minus-one aspect)?In particular I think it's right because
- We trap if
index > bound + guard_size - offset - access_size
- If the RHS of that is equal to
0xffff_ffff
, index could be equal to it but not greater than it; so we cannot achieveindex > RHS
I think it's a little unclear because above in the comment we have
index < 4GiB <= RHS
but here we are really relying onindex <= (4GiB - 1) <= RHS
, which is also valid (<=
is also transitive). I guess aligning the two makes things clearer, at least for me...
alexcrichton submitted PR review.
fitzgen updated PR #5335 from heap-addr-guard-pages
to main
.
fitzgen submitted PR review.
fitzgen created PR review comment:
Updated the comment above this to align more directly with the implementation.
fitzgen has enabled auto merge for PR #5335.
fitzgen merged PR #5335.
Last updated: Dec 23 2024 at 13:07 UTC