[Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop

fw at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jul 6 12:38:25 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989

--- Comment #11 from Florian Weimer <fw at gcc dot gnu.org> ---
It turns out that libc.a did not contain pthread_self until glibc 2.27.  The
symbol was only present in libc.so.6 (as a weird forwarder, for compatibility
with long-defunct LinuxThreads).

This means there could be some fallout from requiring a definition of
pthread_self in the statically linked case, in the form of linking failures
without -lpthread on older glibc (such 2.17, as including in Red Hat Enterprise
Linux 7).


More information about the Gcc-bugs mailing list