[Bug 150959] [libc] Stub pthread_once in libc should call _libc_once
| Newsgroups | gmane.os.freebsd.devel.threading |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=150959 [email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #5 from [email protected] --- The current stub implementation of pthread_once now fails with an error return, which does not seem much of an improvement. In particular, it causes code that is static-linked with openssl to segfault unless libthr is linked into the process (the fact that openssl has inadequate error checks is a separate issue). I've been told in another bug thread that the only reason to have pthread stubs at all is to allow for libraries that might be dynamically loaded into either a threaded or unthreaded process. It seems to me that such libraries would be very likely to want to use pthread_once, and very unlikely to be able to cope with it failing (it has no normal reason to fail). Accordingly, libc should provide either a pthread_once stub that actually works (interoperably with the real implementation in case libthr gets pulled in later), or it should not provide the symbol at all, forcing libraries that want to use it to pull in libthr themselves. see also https://twitter.com/RhodiumToad/status/1165523338481061888 -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-threads To unsubscribe, send any mail to "[email protected]"