[PATCH] D11484: [compiler] [tsan] Enable tsan for aarch64

Adhemerval Zanella adhemerval.zanella at linaro.org
Mon Jul 27 12:54:14 PDT 2015



On 27-07-2015 10:35, Adhemerval Zanella wrote:
> Hi Evgeniy,
> 
> Thanks for the review.
> 
> On 24-07-2015 14:50, Evgeniy Stepanov wrote:
>> eugenis added a comment.
>>
>> Great job! I'll leave the real review to Dmitry. Just a few comments inline.
>>
>>
>> ================
>> Comment at: lib/sanitizer_common/sanitizer_linux_libcdep.cc:267
>> @@ +266,3 @@
>> +  val = 1776;
>> +  if (val)
>> +    atomic_store(&kThreadDescriptorSize, val, memory_order_relaxed);
>> ----------------
>> Looks like this if() is unnecessary, here and above.
> 
> Right, I will change it.
> 
>>
>>
>> ================
>> Comment at: lib/sanitizer_common/sanitizer_linux_libcdep.cc:300
>> @@ -288,1 +299,3 @@
>> +# elif defined(__aarch64__)
>> +  descr_addr = reinterpret_cast<uptr>(__builtin_thread_pointer());
>>  # else
>> ----------------
>> Clang does not recognize this builtin on aarch64. It looks like it only exists on arm. Are you building with gcc?
>>
> 
> Yes and my mistake here (I though I have set my build to use clang). I will rebuild and
> test with clang itself.  About this, it would be easier to use a asm statement, but as
> pointed out clang now has the option to read  some register directly. Would be better
> to add this builtin to clang instead?
> 

I have implemented __buitin_thread_pointer for aarch64-linux on clang and
make check runs ok with.



More information about the llvm-commits mailing list