gcc/libsanitizer/hwasan/hwasan_thread_list.cpp
Martin Liska 1ee3d1ef10 libsanitizer: add hwasan.
Introduce the libhwasan library from LLVM sources.
2020-11-25 16:35:30 +00:00

16 lines
442 B
C++

#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(hwasan_thread_list == nullptr);
hwasan_thread_list =
new (thread_list_placeholder) HwasanThreadList(storage, size);
}
} // namespace