Skip to content

Commit 737bb30

Browse files
committed
min_stack_size: clarify both reasons to use dlsym
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
1 parent b6641c1 commit 737bb30

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/libstd/sys/unix/thread.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -316,11 +316,12 @@ pub fn sleep(dur: Duration) {
316316
// is created in an application with big thread-local storage requirements.
317317
// See #6233 for rationale and details.
318318
//
319-
// Use dlsym to get the symbol value at runtime, for compatibility
320-
// with older versions of glibc. Assumes that we've been dynamically
321-
// linked to libpthread but that is currently always the case. We
322-
// previously used weak linkage (under the same assumption), but that
323-
// caused Debian to detect an unnecessarily strict versioned
319+
// Use dlsym to get the symbol value at runtime, both for
320+
// compatibility with older versions of glibc, and to avoid creating
321+
// dependencies on GLIBC_PRIVATE symbols. Assumes that we've been
322+
// dynamically linked to libpthread but that is currently always the
323+
// case. We previously used weak linkage (under the same assumption),
324+
// but that caused Debian to detect an unnecessarily strict versioned
324325
// dependency on libc6 (#23628).
325326
#[cfg(target_os = "linux")]
326327
fn min_stack_size(attr: *const libc::pthread_attr_t) -> libc::size_t {

0 commit comments

Comments
 (0)