[GWP-ASan] Fix flaky test on Fuchsia
The LateInit test might be reusing some already initialized thread
specific data if run within the main thread. This means that there
is a chance that the current value will not be enough for the 100
iterations, hence the test flaking.
Fix this by making the test run in its own thread.
Differential Revision: https://reviews.llvm.org/D92415
GitOrigin-RevId: c904c32b9c9243b11ffc18e46b7350f000e9c088
diff --git a/guarded_pool_allocator.cpp b/guarded_pool_allocator.cpp
index a895032..13888cb 100644
--- a/guarded_pool_allocator.cpp
+++ b/guarded_pool_allocator.cpp
@@ -148,6 +148,7 @@
State.PageSize));
FreeSlots = nullptr;
}
+ *getThreadLocals() = ThreadLocalPackedVariables();
}
void *GuardedPoolAllocator::allocate(size_t Size) {