Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Nov 2020 21:05:28 +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-LeKvMO28lX@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/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251112

--- Comment #7 from Andrew Stitcher <astitcher@apache.org> ---
(In reply to Konstantin Belousov from comment #6)

So how do the pthreads calls that are in libc work? Are they what you call
'stubs'? In which case does the stub load libpthread to do the actual work or
what else could happen?

If you were to add a stub to libc for pthread_att_get_np what would it do? the
asan runtime requires it to actually return real info about the running thread
so it would have to load the actual libpthread in some way if it was a stub.

It does seems to me that if you never spawn any threads then it looks like the
asan runtime might never actually ever call pthread_attr_get_np. So maybe it
would be good not to change the libc behaviour unless threads were in use.

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

help

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