Skip to content
Commit daa3ebce authored by Adhemerval Zanella's avatar Adhemerval Zanella
Browse files

tsan: Remove __pointer_chk_guard@GLIBC_PRIVATE requirement for AArch64

Current AArch64 {sig}{set,long}jmp interposing requires accessing glibc
private __pointer_chk_guard to get process xor mask to demangled the
internal {sig}jmp_buf function pointers.

It causes some packing issues, as described in gcc PR#71042 [1], and is
is not a godd practice to rely on a private glibc namespace (since ABI is
not meant to be stable).

This patch fixes it by changing how libtsan obtains the guarded pointer
value: at initialization a specific routine issues a setjmp call and
using the mangled function pointer and the original value derive the
random guarded pointer.

Checked on aarch64 39-bit VMA.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71042

llvm-svn: 278292
parent fb9c3818
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment