-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS builds are broken with recent rustc #312
Comments
I've created a branch that I thought would address this problem. The assertion has disappeared, but various tests are failing for reasons that I do not yet understand. Eg. |
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 servo#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]>
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]>
Closed via #314 |
rust-lang/rust#98112 identifies an unaligned write that occurs:
The text was updated successfully, but these errors were encountered: