This is the mail archive of the
mailing list for the glibc project.
Re: glibc 2.25 seems to have broken AddressSaniitzer Inbox x glibc x sanitizer x
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: libc-alpha at sourceware dot org
- Cc: Carlos O'Donell <carlos at redhat dot com>
- Date: Wed, 21 Feb 2018 18:57:04 -0300
- Subject: Re: glibc 2.25 seems to have broken AddressSaniitzer Inbox x glibc x sanitizer x
- Authentication-results: sourceware.org; auth=none
- References: <CAGQ9bdyZDj6gs6G3h2gQ2UyWVMHpuYi3SU0zyJKfGDumP3hJTA@mail.gmail.com>
On 20/02/2018 17:24, Konstantin Serebryany wrote:
> Users are reporting that the fresh glibc breaks AddressSanitizer (asan)
> and probably other sanitizers too.
> The problem seems to be in the new way the dynamic TLS is allocated.
> The current implementation in asan is hackish and a few years back
> we discussed a better one
> but the discussion has stalled.
> Can this be addressed in 2.25? At lest the dtls side?
> Even if we put another set of hacks into the sanitizers to support 2.25,
> the new glibc will break things for those who use older GCC or LLVM versions.
The thread properties API is too late for 2.25 unfortunately, our policy is
to not change and ABI (even by adding new symbol) on released versions.
Similar for your original bug report, most likely this discussion got stalled
because lack of cycles from glibc developers. However based on recent updates
from Carlos in BZ#16291  I think a thread reflection ABI is something not
only sanitizer would benefit. Also you sanitizer might face more issues with
TLS size calculation now that we changed stack size calculation (BZ#22637).
My view off the ABI your proposed is for stack boundaries and static TLS part
it seems reasonable: both query functions initial descriptions are
straightforward and internal implementation should require only reading some
For dynamic TLS I think the interposable symbols seems the better alternative
(since you already listed the issues with callback option) and the extra
PLT calls for the symbols should be ok.
Now for thread exit I think callback as is described should have its semantic
better described with something similar to pthread_atfork. The wording used
in first paragraph describe per-thread callbacks which will be called only
by the thread registering them, however the following sentence defines callbacks
should be register before thread creation. Also this restriction seems very
specific to sanitizers, although I do not have a strong opinion whether we
should allow new registrations after thread creation (for instance
pthread_atfork does not have this restriction). Finally, since the idea is
to exports a GNU abi, we will need a better name.
Carlos, I am adding you on CC because I noted you commented recently on
BZ#16291 about rust requirements of similar API, so it would be good if
current proposal is adequate to rust as well.