Skip to content

Commit

Permalink
Merge pull request #1606 from RalfJung/static-place-proj
Browse files Browse the repository at this point in the history
Places based on misaligned pointers: also mention 'static's as a possible base for place projections
  • Loading branch information
traviscross authored Sep 17, 2024
2 parents d788f38 + d385d42 commit be0e8d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/behavior-considered-undefined.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ The span of bytes a pointer or reference "points to" is determined by the pointe
A place is said to be "based on a misaligned pointer" if the last `*` projection
during place computation was performed on a pointer that was not aligned for its
type. (If there is no `*` projection in the place expression, then this is
accessing the field of a local and rustc will guarantee proper alignment. If
accessing the field of a local or `static` and rustc will guarantee proper alignment. If
there are multiple `*` projection, then each of them incurs a load of the
pointer-to-be-dereferenced itself from memory, and each of these loads is
subject to the alignment constraint. Note that some `*` projections can be
Expand Down

0 comments on commit be0e8d4

Please sign in to comment.