diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-08-16 23:30:18 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-08-16 23:32:13 -0700 |
| commit | 92b69215e63a3303a5e904ab332e2eec236e0ed2 (patch) | |
| tree | 82dc7298eba67fb6881e0a9014d251073c6a76ae /lib/tsan/tsan_interface.cpp | |
| parent | 1b8f0d8b56a578dbd699021dd14ea80d743b7cf8 (diff) | |
| download | zig-92b69215e63a3303a5e904ab332e2eec236e0ed2.tar.gz zig-92b69215e63a3303a5e904ab332e2eec236e0ed2.zip | |
update libcxx, libcxxabi, libunwind, and tsan to llvm 13 rc1
Diffstat (limited to 'lib/tsan/tsan_interface.cpp')
| -rw-r--r-- | lib/tsan/tsan_interface.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/tsan/tsan_interface.cpp b/lib/tsan/tsan_interface.cpp index 2b3a0889b7..9bd0e8580b 100644 --- a/lib/tsan/tsan_interface.cpp +++ b/lib/tsan/tsan_interface.cpp @@ -14,15 +14,12 @@ #include "tsan_interface_ann.h" #include "tsan_rtl.h" #include "sanitizer_common/sanitizer_internal_defs.h" +#include "sanitizer_common/sanitizer_ptrauth.h" #define CALLERPC ((uptr)__builtin_return_address(0)) using namespace __tsan; -typedef u16 uint16_t; -typedef u32 uint32_t; -typedef u64 uint64_t; - void __tsan_init() { cur_thread_init(); Initialize(cur_thread()); @@ -43,13 +40,13 @@ void __tsan_write16(void *addr) { } void __tsan_read16_pc(void *addr, void *pc) { - MemoryRead(cur_thread(), (uptr)pc, (uptr)addr, kSizeLog8); - MemoryRead(cur_thread(), (uptr)pc, (uptr)addr + 8, kSizeLog8); + MemoryRead(cur_thread(), STRIP_PAC_PC(pc), (uptr)addr, kSizeLog8); + MemoryRead(cur_thread(), STRIP_PAC_PC(pc), (uptr)addr + 8, kSizeLog8); } void __tsan_write16_pc(void *addr, void *pc) { - MemoryWrite(cur_thread(), (uptr)pc, (uptr)addr, kSizeLog8); - MemoryWrite(cur_thread(), (uptr)pc, (uptr)addr + 8, kSizeLog8); + MemoryWrite(cur_thread(), STRIP_PAC_PC(pc), (uptr)addr, kSizeLog8); + MemoryWrite(cur_thread(), STRIP_PAC_PC(pc), (uptr)addr + 8, kSizeLog8); } // __tsan_unaligned_read/write calls are emitted by compiler. |
