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
On macOS (and maybe other systems?) cmsg data is 4-byte aligned. In 64-bit macOS environments, libc::timeval contains 8-byte values, and is presumably 8-byte aligned. ControlMessage directly converts the pointer to the cmsg data into a typed reference, which is therefore apparently unaligned and incurs UB. It seems like the only safe thing to do here would be to use ptr::read_unaligned.