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

Adhemerval Zanella adhemerval.zanella at linaro.org
Mon Jul 27 06:35:24 PDT 2015


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?



More information about the llvm-commits mailing list