We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c95f5bb commit 5f7dc8aCopy full SHA for 5f7dc8a
compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
@@ -680,7 +680,8 @@ ThreadState *cur_thread() {
680
// significant bit of TLS_SLOT_SANITIZER to 1. Scudo allocator uses this bit
681
// as a flag to disable memory initialization. This is a workaround to get the
682
// correct ThreadState pointer.
683
- reinterpret_cast<ThreadState*>(addr & ~1ULL);
+ uptr addr = reinterpret_cast<uptr>(thr);
684
+ return reinterpret_cast<ThreadState*>(addr & ~1ULL);
685
}
686
687
void set_cur_thread(ThreadState *thr) {
0 commit comments