[PATCH] D23318: [PATCH] tsan: Remove __pointer_chk_guard at GLIBC_PRIVATE requirement for AArch64
Adhemerval Zanella via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 9 13:50:18 PDT 2016
zatrazz added a comment.
In https://reviews.llvm.org/D23318#510362, @rengolin wrote:
> Reading again, it seems you're just reimplementing a similar logic, with a known global, which is safer than relying on glibc's own copy. So, even for gcc using TSAN, there will be no deviation.
Yes, in fact the requirement of this patch canme from GCC PR#71042.
> You're still relying on _ZN14__interception12real__setjmpE, but that's a public interface so it should be OK, right?
It is in fact '__interception::real__setjmp' which is defined by interceptors macros and initialized at 'InitializeInterceptors'. It requires to use this indirection because 'setjmp/_setjmp' is overriden in this same assembly, so linker won't call GLIBC one.
> Apart from the name nit, I have no real concern.
>
> Cheers,
> Renato
================
Comment at: lib/tsan/rtl/tsan_rtl_aarch64.S:76
@@ -25,3 +75,3 @@
// SP pointer mangling (see glibc setjmp)
- adrp x2, :got:__pointer_chk_guard
- ldr x2, [x2, #:got_lo12:__pointer_chk_guard]
+ adrp x2, pointer_chk_guard
+ ldr x2, [x2, #:lo12:pointer_chk_guard]
----------------
rengolin wrote:
> Maybe call it __tsan_pointer_chk_guard?
Since it is a local symbol I didn't bother with the name, but I think your suggestion seems better. I will change it.
https://reviews.llvm.org/D23318
More information about the llvm-commits
mailing list