Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/unix/linux_like/android/b32/arm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ s! {

pub struct __c_anonymous_uc_sigmask_with_padding {
pub uc_sigmask: crate::sigset_t,
/* Android has a wrong (smaller) sigset_t on x86. */
/* Android has a wrong (smaller) sigset_t on ARM. */
__padding_rt_sigset: Padding<u32>,
}

Expand Down
3 changes: 3 additions & 0 deletions src/unix/linux_like/android/b64/aarch64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ s! {
pub uc_link: *mut ucontext_t,
pub uc_stack: crate::stack_t,
pub uc_sigmask: crate::sigset_t,
/* The kernel adds extra padding after uc_sigmask to match
* glibc sigset_t on ARM64. */
__padding: Padding<[c_char; 128 - size_of::<crate::sigset_t>()]>,

@teor2345 teor2345 Jun 25, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this subtracting sigset_t (32 bit?), but the comment refers to ARM64?

This calculation seems weird for either 32-bit or 64-bit, and might need further comments:

  • the union is the size of sigset64_t (assuming it's bigger) but we subtract sigset_t (the 32-bit size) from the padding

View changes since the review

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pub uc_mcontext: mcontext_t,
}

Expand Down