[compiler-rt] f7c7161 - [HWASAN] Modified __hwasan::Thread::unique_id_ to be u32 instead of u64.
Kirill Stoimenov via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 30 16:44:33 PST 2022
Author: Kirill Stoimenov
Date: 2022-12-01T00:44:22Z
New Revision: f7c71611370d3f5f240b080edfce51cd1e4995ce
URL: https://github.com/llvm/llvm-project/commit/f7c71611370d3f5f240b080edfce51cd1e4995ce
DIFF: https://github.com/llvm/llvm-project/commit/f7c71611370d3f5f240b080edfce51cd1e4995ce.diff
LOG: [HWASAN] Modified __hwasan::Thread::unique_id_ to be u32 instead of u64.
This is needed for LSAN integration work. LSAN uses context to store thread_id << 32 + stack_id. In order to fit both we would need thread_id to be 32 bit.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D139060
Added:
Modified:
compiler-rt/lib/hwasan/hwasan_thread.h
Removed:
################################################################################
diff --git a/compiler-rt/lib/hwasan/hwasan_thread.h b/compiler-rt/lib/hwasan/hwasan_thread.h
index 3db7c1a9454f3..296fa8f2760f1 100644
--- a/compiler-rt/lib/hwasan/hwasan_thread.h
+++ b/compiler-rt/lib/hwasan/hwasan_thread.h
@@ -61,7 +61,7 @@ class Thread {
void DisableTagging() { tagging_disabled_++; }
void EnableTagging() { tagging_disabled_--; }
- u64 unique_id() const { return unique_id_; }
+ u32 unique_id() const { return unique_id_; }
void Announce() {
if (announced_) return;
announced_ = true;
@@ -89,7 +89,7 @@ class Thread {
HeapAllocationsRingBuffer *heap_allocations_;
StackAllocationsRingBuffer *stack_allocations_;
- u64 unique_id_; // counting from zero.
+ u32 unique_id_; // counting from zero.
u32 tagging_disabled_; // if non-zero, malloc uses zero tag in this thread.
More information about the llvm-commits
mailing list