Skip to content

Commit 39ccfc9

Browse files
authored
Rollup merge of rust-lang#126207 - devnexen:stack_overflow_libc_upd, r=joboet
std::unix::stack_overflow::drop_handler addressing todo through libc … …update
2 parents eba461c + beee93f commit 39ccfc9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,7 @@ mod imp {
265265
/// Modern kernels on modern hardware can have dynamic signal stack sizes.
266266
#[cfg(any(target_os = "linux", target_os = "android"))]
267267
fn sigstack_size() -> usize {
268-
// FIXME: reuse const from libc when available?
269-
const AT_MINSIGSTKSZ: crate::ffi::c_ulong = 51;
270-
let dynamic_sigstksz = unsafe { libc::getauxval(AT_MINSIGSTKSZ) };
268+
let dynamic_sigstksz = unsafe { libc::getauxval(libc::AT_MINSIGSTKSZ) };
271269
// If getauxval couldn't find the entry, it returns 0,
272270
// so take the higher of the "constant" and auxval.
273271
// This transparently supports older kernels which don't provide AT_MINSIGSTKSZ

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy