Re: Fix libgomp crash without TLS (PR42616)

2014-12-09 Thread Varvara Rainchik
Can we instead of adding new macroses in config/tls.m4 use something like that in libgomp: #if defined (HAVE_TLS) defined (USE_EMUTLS) (with GCC_CHECK_EMUTLS in libgomp/configure.ac)? 2014-12-08 19:28 GMT+03:00 Jakub Jelinek ja...@redhat.com: On Mon, Dec 08, 2014 at 07:01:09PM +0300, Varvara

Re: Fix libgomp crash without TLS (PR42616)

2014-12-09 Thread Jakub Jelinek
On Tue, Dec 09, 2014 at 02:49:44PM +0300, Varvara Rainchik wrote: Can we instead of adding new macroses in config/tls.m4 use something like that in libgomp: #if defined (HAVE_TLS) defined (USE_EMUTLS) (with GCC_CHECK_EMUTLS in libgomp/configure.ac)? That would be fine too. Jakub

Re: Fix libgomp crash without TLS (PR42616)

2014-12-09 Thread Varvara Rainchik
Ok, the following patch works for Android: 2014-12-09 Varvara Rainchik varvara.rainc...@intel.com * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Add GCC_CHECK_EMUTLS. * libgomp.h: Add check for USE_EMUTLS: this case is equal to

Re: Fix libgomp crash without TLS (PR42616)

2014-12-09 Thread Richard Henderson
On 12/09/2014 06:53 AM, Varvara Rainchik wrote: 2014-12-09 Varvara Rainchik varvara.rainc...@intel.com * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Add GCC_CHECK_EMUTLS. * libgomp.h: Add check for USE_EMUTLS: this case is

Re: Fix libgomp crash without TLS (PR42616)

2014-12-08 Thread Varvara Rainchik
Hi guys, Could you please take a look at this issue? This fix is still urgent for Android. 2014-12-01 18:25 GMT+03:00 Varvara Rainchik varvara.s.rainc...@gmail.com: Hi Jakub, Do you think this patch is ok for upstream: 2014-12-01 Varvara Rainchik varvara.rainc...@intel.com *

Re: Fix libgomp crash without TLS (PR42616)

2014-12-08 Thread Jakub Jelinek
On Mon, Dec 08, 2014 at 04:30:46PM +0300, Varvara Rainchik wrote: Hi guys, Could you please take a look at this issue? This fix is still urgent for Android. I'm afraid it will break those targets where emutls is not on, but the C library doesn't support TLS. I think it is acceptable not to

Re: Fix libgomp crash without TLS (PR42616)

2014-12-08 Thread Varvara Rainchik
Is it ok to add GCC_CHECK_EMUTLS test in libgomp/configure.ac or should I add in tls.m3 a similair test that would be used only in libgomp? 2014-12-08 17:03 GMT+03:00 Jakub Jelinek ja...@redhat.com: On Mon, Dec 08, 2014 at 04:30:46PM +0300, Varvara Rainchik wrote: Hi guys, Could you please

Re: Fix libgomp crash without TLS (PR42616)

2014-12-08 Thread Jakub Jelinek
On Mon, Dec 08, 2014 at 07:01:09PM +0300, Varvara Rainchik wrote: Is it ok to add GCC_CHECK_EMUTLS test in libgomp/configure.ac or should I add in tls.m3 a similair test that would be used only in libgomp? I think config/tls.m4 would be a better place, but doing it in some way where the users

Re: Fix libgomp crash without TLS (PR42616)

2014-12-01 Thread Varvara Rainchik
Hi Jakub, Do you think this patch is ok for upstream: 2014-12-01 Varvara Rainchik varvara.rainc...@intel.com * libgomp/libgomp.h: Eliminate case when HAVE_TLS is not defined: always use tls emulation. * libgomp/team.c: Likewise. -- diff --git a/libgomp/libgomp.h

Re: Fix libgomp crash without TLS (PR42616)

2014-11-10 Thread Varvara Rainchik
*Ping* 2014-10-13 14:48 GMT+04:00 Varvara Rainchik varvara.s.rainc...@gmail.com: Now, I wonder on which OS and why does config/tls.m4 CHECK_GCC_TLS actually fail? Can you figure that out? On Android check passes with --disable-tls (standard while building gcc for Android as TLS is not

Re: Fix libgomp crash without TLS (PR42616)

2014-10-13 Thread Varvara Rainchik
Now, I wonder on which OS and why does config/tls.m4 CHECK_GCC_TLS actually fail? Can you figure that out? On Android check passes with --disable-tls (standard while building gcc for Android as TLS is not supported in bionic) and fails with --enable-tls

Re: Fix libgomp crash without TLS (PR42616)

2014-10-07 Thread Jakub Jelinek
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

Re: Fix libgomp crash without TLS (PR42616)

2014-10-01 Thread Varvara Rainchik
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? 2014-10-01

Re: Fix libgomp crash without TLS (PR42616)

2014-09-30 Thread Varvara Rainchik
Corrected patch: call pthread_setspecific (gomp_tls_key, NULL) in gomp_thread_start if HAVE_TLS is not defined. 2014-09-19 Varvara Rainchik varvara.rainc...@intel.com * libgomp.h (gomp_thread): For non TLS case create thread data. * team.c (non_tls_thread_data_destructor,

Re: Fix libgomp crash without TLS (PR42616)

2014-09-30 Thread Jakub Jelinek
On Tue, Sep 30, 2014 at 11:03:47AM +0400, Varvara Rainchik wrote: Corrected patch: call pthread_setspecific (gomp_tls_key, NULL) in gomp_thread_start if HAVE_TLS is not defined. 2014-09-19 Varvara Rainchik varvara.rainc...@intel.com * libgomp.h (gomp_thread): For non TLS case

Re: Fix libgomp crash without TLS (PR42616)

2014-09-30 Thread Richard Henderson
On 09/30/2014 02:52 AM, Jakub Jelinek wrote: On Tue, Sep 30, 2014 at 11:03:47AM +0400, Varvara Rainchik wrote: Corrected patch: call pthread_setspecific (gomp_tls_key, NULL) in gomp_thread_start if HAVE_TLS is not defined. 2014-09-19 Varvara Rainchik varvara.rainc...@intel.com *

Re: Fix libgomp crash without TLS (PR42616)

2014-09-24 Thread Varvara Rainchik
*Ping* 2014-09-19 15:41 GMT+04:00 Varvara Rainchik varvara.s.rainc...@gmail.com: I've corrected my patch accordingly to what you said. To diffirentiate second case in destructor I've added pthread_setspecific (gomp_tls_key, NULL) at the end of gomp_thread_start. So, destructor can simply skip

Re: Fix libgomp crash without TLS (PR42616)

2014-09-19 Thread Varvara Rainchik
I've corrected my patch accordingly to what you said. To diffirentiate second case in destructor I've added pthread_setspecific (gomp_tls_key, NULL) at the end of gomp_thread_start. So, destructor can simply skip the case when pthread_getspecific (gomp_tls_key) returns 0. I also think that it's

Re: Fix libgomp crash without TLS (PR42616)

2014-09-02 Thread Varvara Rainchik
May I use gomp_free_thread as a destructor for pthread_key_create? Then I'll make initial_thread_tls_data global for the first case, but how can I differentiate thread created by gomp_thread_start (second case)? 2014-09-01 14:51 GMT+04:00 Jakub Jelinek ja...@redhat.com: On Fri, Aug 29, 2014 at

Re: Fix libgomp crash without TLS (PR42616)

2014-09-01 Thread Varvara Rainchik
I've checked several tests, I see that for all tests failure occurs in function gomp_icv (). E.g.: icv-2: #0 gomp_icv (write=true) at ../../../libgomp/libgomp.h:494 #1 omp_set_num_threads (n=6) at ../../../libgomp/env.c:1282 #2 0x00404014 in tf () #3 0x0040d063 in start_thread

Re: Fix libgomp crash without TLS (PR42616)

2014-09-01 Thread Jakub Jelinek
On Fri, Aug 29, 2014 at 10:40:57AM -0700, Richard Henderson wrote: On 08/06/2014 03:05 AM, Varvara Rainchik wrote: * libgomp.h (gomp_thread): For non TLS case create thread data. * team.c (create_non_tls_thread_data): New function. --- diff --git a/libgomp/libgomp.h

Re: Fix libgomp crash without TLS (PR42616)

2014-08-29 Thread Varvara Rainchik
Hi again! I want to remind that issue is urgent for Android. 2014-08-13 12:13 GMT+04:00 Varvara Rainchik varvara.s.rainc...@gmail.com: *Ping* Thanks, Varvara 2014-08-06 14:05 GMT+04:00 Varvara Rainchik varvara.s.rainc...@gmail.com: Hi, The issue was firstly observed on NDK gcc since TLS

Re: Fix libgomp crash without TLS (PR42616)

2014-08-29 Thread Richard Henderson
On 08/06/2014 03:05 AM, Varvara Rainchik wrote: * libgomp.h (gomp_thread): For non TLS case create thread data. * team.c (create_non_tls_thread_data): New function. --- diff --git a/libgomp/libgomp.h b/libgomp/libgomp.h index a1482cc..cf3ec8f 100644 ---

Re: Fix libgomp crash without TLS (PR42616)

2014-08-13 Thread Varvara Rainchik
*Ping* Thanks, Varvara 2014-08-06 14:05 GMT+04:00 Varvara Rainchik varvara.s.rainc...@gmail.com: Hi, The issue was firstly observed on NDK gcc since TLS is not supported in Android bionic. I also see the same failure on gcc configured for linux with –disable-tls, libgomp make check log:

Fix libgomp crash without TLS (PR42616)

2014-08-06 Thread Varvara Rainchik
Hi, The issue was firstly observed on NDK gcc since TLS is not supported in Android bionic. I also see the same failure on gcc configured for linux with –disable-tls, libgomp make check log: FAIL: libgomp.c/affinity-1.c execution test FAIL: libgomp.c/icv-2.c execution test FAIL: