jan-justin opened PR #5921 from cranelift-interpreter-trap-misaligned
to main
:
This PR adds trap generation on misaligned memory accesses when the
aligned
memory flag is set, as proposed over at #5899.<!--
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.
-->
afonso360 submitted PR review.
afonso360 submitted PR review.
afonso360 created PR review comment:
Me and @jan-justin were discussing this on Zulip, and we were unsure if unaligned
stack_{load,store}
s allowed. By coincidence the fuzzer found a similar issue in #5922 so we will probably get our answer there!
afonso360 created PR review comment:
Can we change this to be
explicit_slot 16
? The reason is that this store is accessing memory out of bounds, and the interpreter didn't catch it!Technically the stack slots can be reordered, so we could reorder this slot to be at the end, and then we would access past the end of the stack. The interpreter never does that so it would never detect that case.
I've opened #5927 to track this!
afonso360 edited PR review comment.
jan-justin updated PR #5921 from cranelift-interpreter-trap-misaligned
to main
.
jameysharp submitted PR review.
jameysharp merged PR #5921.
Last updated: Nov 22 2024 at 16:03 UTC