Skip to content

Commit 8e925da

Browse files
authored
[illumos] enable guess_os_stack_limit (#88)
Uses the same logic as FreeBSD and DragonflyBSD. This does require a version of libc with rust-lang/libc#3788 included. Hopefully that goes out soon. For now I'm putting up this PR as a thing to point to. I've verified locally on an illumos machine that stacker is able to: * find the right stack size, and * create new stack segments.
1 parent 91cf50a commit 8e925da

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ test = false
2020

2121
[dependencies]
2222
cfg-if = "1.0.0"
23-
libc = "0.2.45"
23+
libc = "0.2.156"
2424
psm = { path = "psm", version = "0.1.7" }
2525

2626
[target.'cfg(windows)'.dependencies.windows-sys]

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ cfg_if! {
419419
assert_eq!(libc::pthread_attr_destroy(attr.as_mut_ptr()), 0);
420420
Some(stackaddr as usize)
421421
}
422-
} else if #[cfg(any(target_os = "freebsd", target_os = "dragonfly"))] {
422+
} else if #[cfg(any(target_os = "freebsd", target_os = "dragonfly", target_os = "illumos"))] {
423423
unsafe fn guess_os_stack_limit() -> Option<usize> {
424424
let mut attr = std::mem::MaybeUninit::<libc::pthread_attr_t>::uninit();
425425
assert_eq!(libc::pthread_attr_init(attr.as_mut_ptr()), 0);

0 commit comments

Comments
 (0)