Skip to content

Commit

Permalink
Fix alignment of uc_ucontext fields on arm64 android (rust-lang#3894)
Browse files Browse the repository at this point in the history
[ change `core` to `::core` and move ucontext_t to s_no_extra_traits for
  backport - Trevor ]
(backport <rust-lang#3894>)
(cherry picked from commit 707d32c)
  • Loading branch information
CUB3D authored and tgross35 committed Nov 7, 2024
1 parent b01982b commit 16266a4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/unix/linux_like/android/b64/aarch64/align.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@ s_no_extra_traits! {
pub struct max_align_t {
priv_: [f32; 8]
}
}

s! {
#[allow(missing_debug_implementations)]
pub struct ucontext_t {
pub uc_flags: ::c_ulong,
pub uc_link: *mut ucontext_t,
pub uc_stack: ::stack_t,
pub uc_sigmask: ::sigset_t,
pub __pad: [u8; 1024 / 8 - ::core::mem::size_of::<::sigset_t>()],
pub uc_mcontext: mcontext_t,
}
}

s! {
#[repr(align(16))]
pub struct mcontext_t {
pub fault_address: ::c_ulonglong,
Expand Down

0 comments on commit 16266a4

Please sign in to comment.