diff options
author | Vitaly Buka <vitalybuka@google.com> | 2023-05-08 15:32:55 -0700 |
---|---|---|
committer | Vitaly Buka <vitalybuka@google.com> | 2023-05-08 16:26:29 -0700 |
commit | 16a76397abb32e852a163a7c709682f0f88c2b1d (patch) | |
tree | 12aa6664b2fe739c3dd10b228301e42abbf00b6c /compiler-rt | |
parent | 281195a22f07e5afe90ac4b4cbe4b79ecd961b68 (diff) | |
download | llvm-16a76397abb32e852a163a7c709682f0f88c2b1d.tar.gz |
[NFC][HWASAN] Hide thread_list_placeholder
Diffstat (limited to 'compiler-rt')
-rw-r--r-- | compiler-rt/lib/hwasan/hwasan_thread_list.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler-rt/lib/hwasan/hwasan_thread_list.cpp b/compiler-rt/lib/hwasan/hwasan_thread_list.cpp index d528f520cc9e..1ae3664f2827 100644 --- a/compiler-rt/lib/hwasan/hwasan_thread_list.cpp +++ b/compiler-rt/lib/hwasan/hwasan_thread_list.cpp @@ -1,13 +1,16 @@ #include "hwasan_thread_list.h" namespace __hwasan { -static ALIGNED(16) char thread_list_placeholder[sizeof(HwasanThreadList)]; + static HwasanThreadList *hwasan_thread_list; HwasanThreadList &hwasanThreadList() { return *hwasan_thread_list; } void InitThreadList(uptr storage, uptr size) { CHECK_EQ(hwasan_thread_list, nullptr); + + static ALIGNED(alignof( + HwasanThreadList)) char thread_list_placeholder[sizeof(HwasanThreadList)]; hwasan_thread_list = new (thread_list_placeholder) HwasanThreadList(storage, size); } |