Skip to content

Commit

Permalink
std::unix::stack_overflow::drop_handler addressing todo through libc …
Browse files Browse the repository at this point in the history
…update
  • Loading branch information
devnexen committed Oct 17, 2024
1 parent 86bd459 commit 355a93c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion library/std/src/sys/pal/unix/stack_overflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,10 @@ mod imp {
/// Modern kernels on modern hardware can have dynamic signal stack sizes.
#[cfg(any(target_os = "linux", target_os = "android"))]
fn sigstack_size() -> usize {
// FIXME: reuse const from libc when available?
#[cfg(target_os = "linux")]
const AT_MINSIGSTKSZ: crate::ffi::c_ulong = libc::AT_MINSIGSTKSZ;
// FIXME: reuse const from libc when available ?
#[cfg(target_os = "android")]
const AT_MINSIGSTKSZ: crate::ffi::c_ulong = 51;
let dynamic_sigstksz = unsafe { libc::getauxval(AT_MINSIGSTKSZ) };
// If getauxval couldn't find the entry, it returns 0,
Expand Down

0 comments on commit 355a93c

Please sign in to comment.