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: Aurelien Jarno <aurelien at aurel32 dot net>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: Richard Henderson <rth at twiddle dot net>, Alan Modra <amodra at gmail dot com>, Roland McGrath <roland at hack dot frob dot com>, codonell at redhat dot com, libc-alpha at sourceware dot org, rth at redhat dot com
- Date: Mon, 23 Nov 2015 16:15:38 +0100
- Subject: Re: [BZ#17090/17620/17621]: fix DTV race, assert, and DTV_SURPLUS Static TLS limit
- Authentication-results: sourceware.org; auth=none
- References: <oroas0mzri dot fsf at free dot home> <orlhmgyall dot fsf at free dot home> <orlhlgdb8d dot fsf at livre dot home> <ormw411b25 dot fsf at livre dot home> <20150304050529 dot GD26435 at bubble dot grove dot modra dot org> <20150304110430 dot GE26435 at bubble dot grove dot modra dot org> <ory4nb6mmc dot fsf at livre dot home> <orlhja7vgs dot fsf at livre dot home> <55072871 dot 3060104 at twiddle dot net> <oregoomeda dot fsf at livre dot home>
On 2015-03-17 01:34, Alexandre Oliva wrote:
> On Mar 16, 2015, Richard Henderson <rth@twiddle.net> wrote:
>
> > On 03/05/2015 05:42 PM, Alexandre Oliva wrote:
> >> On Mar 5, 2015, Alexandre Oliva <aoliva@redhat.com> wrote:
> >>
> >>> > On Mar 4, 2015, Alan Modra <amodra@gmail.com> wrote:
> >>>> >> On Wed, Mar 04, 2015 at 03:35:29PM +1030, Alan Modra wrote:
> >>>>> >>> As does nptl/tst-stack4 on x86_64 if tst-stack4mod.so is built with
> >>>>> >>> -mtls-dialect=gnu2.
> >>>> >> This on top of your patch gets me past the segfault in free().
> >>>> >> I now hit another segfault, tst-stack4mod.c:function somehow has
> >>>> >> var == NULL.
> >>> > Thanks, here's an incremental patch that fixes the attempt to release
> >>> > the pointer from an entry past the end of the dtv (that you fixed
> >>> > above); that ensures we don't use, in a TLS Descriptor, the generation
> >>> > count of an earlier map that used the same dtv slot (this ensures we
> >>> > update the DTV instead of happily using a NULL pointer in there); and
> >>> > that silences a -Wundef warning in nptl_db, that I had missed when I
> >>> > updated the #ifs for the last-posted version of the patch.
> >>> > I'm now running a full build and test cycle with the combined patch,
> >>> > that I will post once it (hopefully ;-) completes successfully.
> >> Success (x86_64-linux-gnu, with -mtls-dialect=gnu2)!
>
> > The patch looks good to me. (And success with aarch64-linux-gnu!)
>
> Thanks. Here's what I've just pushed to master, after adjusting the
> patch for changed context in NEWS and nptl_db/td_symbol_list.c.
>
>
> Fix DTV race, assert, DTV_SURPLUS Static TLS limit, and nptl_db garbage
Sorry for the (huge) delay. I have identified that this patch is the
reason why the test nptl/tst-cancel24-static now fails with a segfault
on at least arm and mips [1].
Do you have an idea what could be the reason?
Thanks,
Aurelien
[1] https://sourceware.org/glibc/wiki/Release/2.22
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://www.aurel32.net