Skip to content

Commit 795fddf

Browse files
committed
Regenerate mach_sys.rs to fix struct field alignments
The current 'mach_sys.rs' was generated before rust-bindgen started translating '#pragma pack(n)' directives into '#[repr(C, packed(n)]' attributes on the rust struct defintions. These missing attributes cause debug assertions to fail because of misaligned access to the fields when serializing and deserializing the structs for mach_msg calls (see #312). This PR regenerates the 'mach_sys.rs' file using the latest bindgen and mach headers from XCode MacOS SDK. It also introduces padding *before* the 'data size' field for messages with inline data so that they begin at 8-byte aligned addresses as required by rustc. Signed-off-by: Mukilan Thiyagarajan <[email protected]>
1 parent 7f432aa commit 795fddf

File tree

3 files changed

+41352
-9775
lines changed

3 files changed

+41352
-9775
lines changed

0 commit comments

Comments
 (0)