This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [BZ#17090/17620/17621]: fix DTV race, assert, and DTV_SURPLUS Static TLS limit
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 18 Nov 2014 20:08:49 -0200
- Subject: Re: [BZ#17090/17620/17621]: fix DTV race, assert, and DTV_SURPLUS Static TLS limit
- Authentication-results: sourceware.org; auth=none
- References: <ormw7ol1sf dot fsf at free dot home> <20141118203338 dot ECA5F2C3B25 at topped-with-meat dot com>
On Nov 18, 2014, Roland McGrath <roland@hack.frob.com> wrote:
> Use __glibc_{,un}likely rather than __builtin_expect.
*nod*, I've now changed the code I had reindented.
> Can you confirm that this does not change the set of states that might be
> seen by td_thr_tlsbase?
No, but I can confirm that, after this change, td_thr_tlsbase may return
as much garbage for Static TLS modules as the current code may for
dynamic TLS modules, since it doesn't check generation counts.
It would be possible to change it so that it compares the generation
count of the module and that of the DTV, so as to avoid returning
garbage; it could even compute the address for Static TLS modules, so
that we kept on returning the same pointer, regardless of what is
actually in the DTV. Should it?
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer