[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
This commit is contained in:
Kostya Kortchinsky 2020-12-01 11:46:23 -08:00
parent b40b3196b3
commit c904c32b9c
1 changed files with 1 additions and 0 deletions

View File

@ -148,6 +148,7 @@ void GuardedPoolAllocator::uninitTestOnly() {
State.PageSize));
FreeSlots = nullptr;
}
*getThreadLocals() = ThreadLocalPackedVariables();
}
void *GuardedPoolAllocator::allocate(size_t Size) {