| author | |
| committer | |
| log | a3693aae3a9417c4298788af570762945b21ccba |
| tree | c1c61620845a20b59518fc31cf30d76cbe0ef260 |
| parent | bc3c50c21ea3dd902731c1da6bf9b7135eb5b1c1 |
| parent | 2a55fcd03afb0306b4006f67ef24d29ee183bdcf |
| signature |
5 files changed, 15 insertions(+), 8 deletions(-)
lib/libtsan/sanitizer_common/sanitizer_linux.cpp+4| ... | ... | @@ -86,6 +86,10 @@ |
| 86 | 86 | # include <sys/sysmacros.h> |
| 87 | 87 | # endif |
| 88 | 88 | |
| 89 | # if SANITIZER_LINUX && defined(__powerpc64__) | |
| 90 | # include <asm/ptrace.h> | |
| 91 | # endif | |
| 92 | ||
| 89 | 93 | # if SANITIZER_FREEBSD |
| 90 | 94 | # include <machine/atomic.h> |
| 91 | 95 | # include <sys/exec.h> |
lib/libtsan/sanitizer_common/sanitizer_linux_libcdep.cpp+7-6| ... | ... | @@ -619,21 +619,22 @@ static void GetTls(uptr *addr, uptr *size) { |
| 619 | 619 | *addr = tp - RoundUpTo(*size, align); |
| 620 | 620 | *size = tp - *addr + ThreadDescriptorSize(); |
| 621 | 621 | # else |
| 622 | if (SANITIZER_GLIBC) | |
| 623 | *size += 1664; | |
| 624 | else if (SANITIZER_FREEBSD) | |
| 625 | *size += 128; // RTLD_STATIC_TLS_EXTRA | |
| 626 | # if defined(__mips__) || defined(__powerpc64__) || SANITIZER_RISCV64 | |
| 622 | # if SANITIZER_GLIBC | |
| 623 | *size += 1664; | |
| 624 | # elif SANITIZER_FREEBSD | |
| 625 | *size += 128; // RTLD_STATIC_TLS_EXTRA | |
| 626 | # if defined(__mips__) || defined(__powerpc64__) || SANITIZER_RISCV64 | |
| 627 | 627 | const uptr pre_tcb_size = TlsPreTcbSize(); |
| 628 | 628 | *addr -= pre_tcb_size; |
| 629 | 629 | *size += pre_tcb_size; |
| 630 | # else | |
| 630 | # else | |
| 631 | 631 | // arm and aarch64 reserve two words at TP, so this underestimates the range. |
| 632 | 632 | // However, this is sufficient for the purpose of finding the pointers to |
| 633 | 633 | // thread-specific data keys. |
| 634 | 634 | const uptr tcb_size = ThreadDescriptorSize(); |
| 635 | 635 | *addr -= tcb_size; |
| 636 | 636 | *size += tcb_size; |
| 637 | # endif | |
| 637 | 638 | # endif |
| 638 | 639 | # endif |
| 639 | 640 | # elif SANITIZER_NETBSD |
lib/libtsan/sanitizer_common/sanitizer_platform_limits_posix.cpp+1-1| ... | ... | @@ -96,7 +96,7 @@ |
| 96 | 96 | # include <sys/ptrace.h> |
| 97 | 97 | # if defined(__mips64) || defined(__aarch64__) || defined(__arm__) || \ |
| 98 | 98 | defined(__hexagon__) || defined(__loongarch__) || SANITIZER_RISCV64 || \ |
| 99 | defined(__sparc__) | |
| 99 | defined(__sparc__) || defined(__powerpc64__) | |
| 100 | 100 | # include <asm/ptrace.h> |
| 101 | 101 | # ifdef __arm__ |
| 102 | 102 | typedef struct user_fpregs elf_fpregset_t; |
lib/libtsan/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp+2-1| ... | ... | @@ -31,7 +31,8 @@ |
| 31 | 31 | #include <sys/types.h> // for pid_t |
| 32 | 32 | #include <sys/uio.h> // for iovec |
| 33 | 33 | #include <elf.h> // for NT_PRSTATUS |
| 34 | #if (defined(__aarch64__) || SANITIZER_RISCV64 || SANITIZER_LOONGARCH64) && \ | |
| 34 | #if (defined(__aarch64__) || defined(__powerpc64__) || \ | |
| 35 | SANITIZER_RISCV64 || SANITIZER_LOONGARCH64) && \ | |
| 35 | 36 | !SANITIZER_ANDROID |
| 36 | 37 | // GLIBC 2.20+ sys/user does not include asm/ptrace.h |
| 37 | 38 | # include <asm/ptrace.h> |
src/libs/libtsan.zig+1| ... | ... | @@ -346,6 +346,7 @@ fn addCcArgs(target: std.Target, args: *std.ArrayList([]const u8)) error{OutOfMe |
| 346 | 346 | "-std=c++17", |
| 347 | 347 | "-fno-rtti", |
| 348 | 348 | "-fno-exceptions", |
| 349 | "-w", // Disable all warnings. | |
| 349 | 350 | }); |
| 350 | 351 | |
| 351 | 352 | if (target.abi.isAndroid() and target.os.version_range.linux.android >= 29) { |