-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Get __pthread_get_minstack at runtime with dlsym #23631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Linking __pthread_get_minstack, even weakly, was causing Debian’s dpkg-shlibdeps to detect an unnecessarily strict versioned dependency on libc6. Closes rust-lang#23628. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
r? @pcwalton (rust_highfive has picked a reviewer for you, use r? to override) |
#[cfg(target_os = "linux")] | ||
fn min_stack_size(attr: *const libc::pthread_attr_t) -> libc::size_t { | ||
type F = unsafe extern "C" fn(*const libc::pthread_attr_t) -> libc::size_t; | ||
extern { | ||
#[linkage = "extern_weak"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since you're removing this could you merge the mac os implementation into this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m not a Mac user; does Rust use glibc on Mac? I figured we shouldn’t waste time looking up __pthread_get_minstack
on non-glibc.
(But yeah, I should update the comment below, if nothing else.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i guess i'm not sure, just going by this comment: https://github.com/rust-lang/rust/blob/master/src/libstd/sys/unix/thread.rs#L335
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
We currently actually have a two other of these sorts of |
Those two are less problematic because they aren’t
|
Ah well it looks like |
Linking `__pthread_get_minstack`, even weakly, was causing Debian’s `dpkg-shlibdeps` to detect an unnecessarily strict versioned dependency on libc6. Closes rust-lang#23628.
Linking
__pthread_get_minstack
, even weakly, was causing Debian’sdpkg-shlibdeps
to detect an unnecessarily strict versioned dependency on libc6.Closes #23628.