HomeFreeBSD

Fix order of libthr and libc in the global dso list for sshd, by

Description

Fix order of libthr and libc in the global dso list for sshd, by
explicitely linking main binary with -lpthread. Before, libthr
appeared in the list due to dependency of one of the kerberos libs.
Due to the change in ld(1) behaviour of not copying NEEDED entries
from direct dependencies into the link results, the order becomes
reversed.

The libthr must appear before libc to properly interpose libc symbols
and provide working rtld locks implementation. The symptom was sshd
hanging on rtld bind lock during nested symbol binding from a signal
handler.

Approved by: des (openssh maintainer)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Details

Provenance
kibAuthored on
Parents
rS265002: When vm_fault_copy_entry() is called from vm_map_protect() for a wired
Branches
Unknown
Tags
Unknown

Event Timeline