Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Nov 2020 08:03:29 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [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
Message-ID:  <bug-251112-227-twQlKA9s8C@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-251112-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-251112-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D251112

--- Comment #6 from Konstantin Belousov <kib@FreeBSD.org> ---
(In reply to Andrew Stitcher from comment #5)
Depending on whether libpthread linked into the process or not (as well it
might be not linked but loaded later), libc changes its algorithms.  For
instance, stdio FILEs are locked if libpthread is present, and not locked
otherwise.  Similarly, rtld uses real (but custom) rw locks to protect it
internal state if libpthread is there, otherwise it just masks signals using
cheap sigfastblock(2) backdoor.

This is why I asked whether it acceptable to change the C runtime behavior
by sneaky linking with libpthread if ASAN is used.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-251112-227-twQlKA9s8C>