This is the mail archive of the
mailing list for the GCC project.
Re: Fix libgomp crash without TLS (PR42616)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Varvara Rainchik <varvara dot s dot rainchik at gmail dot com>
- Cc: Richard Henderson <rth at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 7 Oct 2014 09:11:25 +0200
- Subject: Re: Fix libgomp crash without TLS (PR42616)
- Authentication-results: sourceware.org; auth=none
- References: <CAAp9h93CTb_oZ-y4-GgJUN7wTkjUajWMzGD+eyY43wJHQFw5eg at mail dot gmail dot com> <5400BB29 dot 2010205 at redhat dot com> <20140901105136 dot GM17454 at tucnak dot redhat dot com> <CAAp9h93RHkPQNCc_U1Vp+aoFEi2KcRhgQzsaVzAZ5mEyutMjAw at mail dot gmail dot com> <CAAp9h93LV3g-VLoEjD3x7nfHOvcxYJjqR7RXF7Y1CKAm-2j8XA at mail dot gmail dot com> <CAAp9h93vx+cM=sNNRzKd0FNABrt96TEmRoU=WOEZnyYrm6zkqQ at mail dot gmail dot com> <CAAp9h91Gd6nauh5Vm4bStXwKcMDdc_fDs+xHtZa1c7DziCpv3g at mail dot gmail dot com> <20140930095219 dot GA1986 at tucnak dot redhat dot com> <542AC0F4 dot 9090808 at redhat dot com> <CAAp9h92JrSYjicz1A2ysfNniXAVk2LkE9WsLNiGXQehgS2yKdQ at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Oct 01, 2014 at 08:44:59PM +0400, Varvara Rainchik wrote:
> Ok, then here it is a new patch (tested and bootstrapped on linux).
> On linux with --disable-tls now all libgomp make check tests pass; for
> Android I've patched toolchain and tried test from one of the
> mentioned bugs, test passes too.
> Is there some benchmark to check performance?
There is SPEC OMP,
Now, I wonder on which OS and why does config/tls.m4 CHECK_GCC_TLS
actually fail? Can you figure that out?
If we get rid of HAVE_TLS code altogether, we might lose support of
some very old OSes, e.g. some Linux distros with a recent gcc and binutils
(so that emutls isn't used), but very old glibc (that doesn't support
TLS or supports it incorrectly, think of pre-2002 glibc). So, if we get
rid of !HAVE_TLS code in libgomp, it would be nice if config/tls.m4 detected
it properly and we'd just fail at configure time.
And if we don't, just make sure that on Android, Darwin and/or M$Win (or
whatever other OS you had in mind which does support pthreads, but doesn't
support native TLS) find out why HAVE_AS_TLS is not defined (guess
config.log should explain that).
> 2014-10-01 Varvara Rainchik <email@example.com>
> * libgomp.h (HAVE_TLS): Set to 1.