Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,8 @@ ThreadState *cur_thread() {
// significant bit of TLS_SLOT_SANITIZER to 1. Scudo allocator uses this bit
// as a flag to disable memory initialization. This is a workaround to get the
// correct ThreadState pointer.
reinterpret_cast<ThreadState*>(addr & ~1ULL);
uptr addr = reinterpret_cast<uptr>(thr);
return reinterpret_cast<ThreadState*>(addr & ~1ULL);
}

void set_cur_thread(ThreadState *thr) {
Expand Down