-
Notifications
You must be signed in to change notification settings - Fork 160
Closed
Description
For example: https://github.com/rust-lang/rustc-perf/actions/runs/4369582919/jobs/7643528165
ntapi
is failing to build:
error[E0793]: reference to packed field is unaligned
--> C:\Users\runneradmin\.cargo\registry\src\github.202132.xyz-1ecc6299db9ec823\ntapi-0.3.6\src\ntexapi.rs:2785:52
|
2785 | *tick_count.QuadPart_mut() = read_volatile(&(*USER_SHARED_DATA).u.TickCountQuad);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
= help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
error[E0793]: reference to packed field is unaligned
--> C:\Users\runneradmin\.cargo\registry\src\github.202132.xyz-1ecc6299db9ec823\ntapi-0.3.6\src\ntexapi.rs:2809:25
|
2809 | ((read_volatile(&(*USER_SHARED_DATA).u.TickCountQuad)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
= help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
MSxDOS/ntapi#15 is the issue in the ntapi
repo.
Metadata
Metadata
Assignees
Labels
No labels