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 Jun 15, 2024
1 parent 92af831 commit 0e02247
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library/std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ miniz_oxide = { version = "0.7.0", optional = true, default-features = false }
addr2line = { version = "0.22.0", optional = true, default-features = false }

[target.'cfg(not(all(windows, target_env = "msvc")))'.dependencies]
libc = { version = "0.2.153", default-features = false, features = ['rustc-dep-of-std'], public = true }
libc = { version = "0.2.155", default-features = false, features = ['rustc-dep-of-std'], public = true }

[target.'cfg(all(not(target_os = "aix"), not(all(windows, target_env = "msvc", not(target_vendor = "uwp")))))'.dependencies]
object = { version = "0.36.0", default-features = false, optional = true, features = ['read_core', 'elf', 'macho', 'pe', 'unaligned', 'archive'] }
Expand Down
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 @@ -232,7 +232,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 0e02247

Please sign in to comment.