[Bug 251112] Compiling C++ with asan fails by default because libclang_rt.asan-x86_64.so uses symbol pthread_attr_get_np but doesn't link to libpthread.so
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Nov 18 15:40:06 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251112
--- Comment #5 from Andrew Stitcher <astitcher at apache.org> ---
(In reply to Konstantin Belousov from comment #4)
I'm not sure I really understand what you mean about linking with libpthread.so
changing the behaviour of libc.so. Most of the FreeBSD pthread calls are
already in libc (or at least don't need to explicitly link with -lpthread
according to the manpage).
So I expected that libc is already multithreaded and linking in pthread is only
used for the _np (non portable/posix) pthread calls.
Looking at the clang source code pthread_attr_get_np is used to get the stack
parameters (pthread_getattr_np is #defined to pthread_attr_get_np):
pthread_attr_t attr;
pthread_attr_init(&attr);
CHECK_EQ(pthread_getattr_np(pthread_self(), &attr), 0);
my_pthread_attr_getstack(&attr, &stackaddr, &stacksize);
pthread_attr_destroy(&attr);
I'm not sure how relevant this is to what you're interested in, but the symbol
is used to call a function.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list