You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
uefi-raw: Add explicit padding field for MemoryDescriptor + add test
By convention, structs having a C representation should be explicit with their
in-between padding fields. This allows users memory-safe trivial serialization
and deserialization by accessing the underlying memory as byte slice. Without
this fields being explicit, Miri complains about uninitialized memory accesses,
which is UB.
uefi-raw: add test for MemoryDescriptor to catch Miri problems
The underlying issue is that if someone wants to cast a slice of descriptors to a
byte slice, the uninitialized **implicit** padding bytes are UB. Miri complains
about that.
0 commit comments