Skip to content

Commit 0e02247

Browse files
committed
std::unix::stack_overflow::drop_handler addressing todo through libc update
1 parent 92af831 commit 0e02247

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

library/std/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ miniz_oxide = { version = "0.7.0", optional = true, default-features = false }
3131
addr2line = { version = "0.22.0", optional = true, default-features = false }
3232

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

3636
[target.'cfg(all(not(target_os = "aix"), not(all(windows, target_env = "msvc", not(target_vendor = "uwp")))))'.dependencies]
3737
object = { version = "0.36.0", default-features = false, optional = true, features = ['read_core', 'elf', 'macho', 'pe', 'unaligned', 'archive'] }

library/std/src/sys/pal/unix/stack_overflow.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,10 @@ mod imp {
232232
/// Modern kernels on modern hardware can have dynamic signal stack sizes.
233233
#[cfg(any(target_os = "linux", target_os = "android"))]
234234
fn sigstack_size() -> usize {
235-
// FIXME: reuse const from libc when available?
235+
#[cfg(target_os = "linux")]
236+
const AT_MINSIGSTKSZ: crate::ffi::c_ulong = libc::AT_MINSIGSTKSZ;
237+
// FIXME: reuse const from libc when available ?
238+
#[cfg(target_os = "android")]
236239
const AT_MINSIGSTKSZ: crate::ffi::c_ulong = 51;
237240
let dynamic_sigstksz = unsafe { libc::getauxval(AT_MINSIGSTKSZ) };
238241
// If getauxval couldn't find the entry, it returns 0,

0 commit comments

Comments
 (0)