Skip to content

Commit

Permalink
Fix size/align of ucontext_t on aarch64-apple-darwin
Browse files Browse the repository at this point in the history
This commit effectively reverts rust-lang#2817. Currently `ucontext_t` has both
the wrong size and the wrong alignment for aarch64-apple-darwin which
causes problems for users referencing the structure [1]. The issue
linked from rust-lang#2817 claimed that it fixed rust-lang#2812 but that's still an issue
where FFI warnings are still emitted for usage of `ucontext_t` due to
its transitive usage of `u128`. I'm not sure how to fix rust-lang#2812 myself,
but given that rust-lang#2817 doesn't appear to solve its original intent and
additionally the size/align are currently wrong this commit reverts in
the meantime.

[1]: bytecodealliance/wasmtime#6785 (comment)
  • Loading branch information
alexcrichton authored and xevor11 committed Aug 25, 2023
1 parent 50157ee commit a3be776
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/unix/bsd/apple/b64/aarch64/align.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ s! {
pub uc_link: *mut ::ucontext_t,
pub uc_mcsize: usize,
pub uc_mcontext: mcontext_t,
__mcontext_data: __darwin_mcontext64,
}

pub struct __darwin_mcontext64 {
Expand Down

0 comments on commit a3be776

Please sign in to comment.