Reevaluate Miri engine alignment checks #63085
Labels
A-const-eval
Area: Constant evaluation (MIR interpretation)
A-miri
Area: The miri tool
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Two PRs will likely land soon that change the way the Miri engine does alignment checks: #63079 and #63075.
The former entirely disables alignment checks for CTFE (when the Miri engine is used as part of compilation). The latter moves the checking of "access validity" of a pointer (non-dangling and aligned) to the moment the pointer is dereferenced (using the
*
operator), as opposed to doing the checks only when a load/store actually happens.As a consequence, the
align
field ofMemPlace
is now effectively dead weight in both instances of the Miri engine. However, Miri might need it again in the future if we decide to relax the rules for dereferencing pointers, which is a discussion I want to have after rust-lang/rfcs#2582. Then we should either remove thealign
field for good, or try to abstract it through theMachine
trait so that CTFE does not have to carry it. Also see #63079 (comment).Cc @oli-obk
The text was updated successfully, but these errors were encountered: