This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 2.25 freeze status


On Jan 27, 2017, Florian Weimer <fweimer@redhat.com> wrote:

>> writing to the dtv of other threads is neither
>> necessary nor correct.

> Let's do it then.  Is this patch okay?

I see you're taken out the reversal of

	* elf/dl-reloc.c (_dl_nothread_init_static_tls)

from the patch I proposed back on Sept 24 for BZ #19826.

I don't think it is right to drop that part.

That's the nptl-less TLS initializer analogous to

	* nptl/allocatestack.c (init_one_static_tls)

in programs that link with libpthread.


Before the fix for BZs #17090, #17620, #17621 and #17628 (f8aeae3473),
we'd just abort if the static TLS modid grew past the initial DTV size.
I'm not sure there's code in place to resize the DTV within dlopen
before calling GL(dl_init_static_tls), that resolves to either
_dl_nothread_init_static_tls, that deals with the single thread, or
__pthread_init_static_tls, that calls init_one_static_tls for each
thread, so dlopening multiple static-TLS libs in a program not linked
with libpthread might abort at the assert that checks that the modid is
lower than the DTV length.

Unless you've verified that this is safe, I'd strongly advise against
dropping the analogous change for single-threaded programs from the
patch I had proposed.

I'd also suggest adding comments to the effect that 'we leave it for
tls_get_addr to update each thread's DTV, since it might need resizing'.

Thanks for taking care of this,

-- 
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]