We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8852bf commit ddf1164Copy full SHA for ddf1164
src/guess_os_stack_limit/openbsd.rs
@@ -1,8 +1,8 @@
1
pub unsafe fn guess_os_stack_limit() -> Option<usize> {
2
let mut stackinfo = std::mem::MaybeUninit::<libc::stack_t>::uninit();
3
- assert_eq!(
4
- libc::pthread_stackseg_np(libc::pthread_self(), stackinfo.as_mut_ptr()),
5
- 0
6
- );
+ let res = libc::pthread_stackseg_np(libc::pthread_self(), stackinfo.as_mut_ptr());
+ if res != 0 {
+ return None;
+ }
7
Some(stackinfo.assume_init().ss_sp as usize - stackinfo.assume_init().ss_size)
8
}
0 commit comments