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  0x0000000000404014 in tf ()
#3  0x000000000040d063 in start_thread ()
#4  0x0000000000450139 in clone ()

lock-3:
#0  gomp_icv (write=true) at ../../../libgomp/libgomp.h:494
#1  omp_test_nest_lock (lock=0x6dd580 <lock>) at
../../../libgomp/config/linux/lock.c:109
#2  0x0000000000403fbc in tf ()
#3  0x000000000040ccd3 in start_thread ()
#4  0x000000000044fda9 in clone ()

2014-08-29 21:40 GMT+04:00 Richard Henderson <r...@redhat.com>:
> 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
>> --- a/libgomp/libgomp.h
>> +++ b/libgomp/libgomp.h
>> @@ -479,9 +479,15 @@ static inline struct gomp_thread *gomp_thread (void)
>> }
>> #else
>> extern pthread_key_t gomp_tls_key;
>> +extern struct gomp_thread *create_non_tls_thread_data (void);
>> static inline struct gomp_thread *gomp_thread (void)
>> {
>> -  return pthread_getspecific (gomp_tls_key);
>> +  struct gomp_thread *thr = pthread_getspecific (gomp_tls_key);
>> +  if (thr == NULL)
>> +  {
>> +    thr = create_non_tls_thread_data ();
>> +  }
>> +  return thr;
>> }
>
> This should never happen.
>
> The thread-specific data is set in gomp_thread_start and initialize_team.
>
> Where are you getting a call to gomp_thread that hasn't been through one of
> those functions?
>
>
> r~
>

Reply via email to