Skip to content

Commit

Permalink
[GWP-ASan] Fix flaky test on Fuchsia
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Kostya Kortchinsky committed Dec 2, 2020
1 parent b40b319 commit c904c32
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp
Expand Up @@ -148,6 +148,7 @@ void GuardedPoolAllocator::uninitTestOnly() {
State.PageSize));
FreeSlots = nullptr;
}
*getThreadLocals() = ThreadLocalPackedVariables();
}

void *GuardedPoolAllocator::allocate(size_t Size) {
Expand Down

0 comments on commit c904c32

Please sign in to comment.