aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKostya Kortchinsky <kostyak@google.com>2020-12-01 11:46:23 -0800
committerKostya Kortchinsky <kostyak@google.com>2020-12-02 09:00:51 -0800
commitc904c32b9c9243b11ffc18e46b7350f000e9c088 (patch)
tree45804e21ed1f195ad5f1919bfe69b603844ba404
parentb40b3196b32110f00b7610851f4ef182ac751ba0 (diff)
downloadllvm-c904c32b9c9243b11ffc18e46b7350f000e9c088.zip
llvm-c904c32b9c9243b11ffc18e46b7350f000e9c088.tar.gz
llvm-c904c32b9c9243b11ffc18e46b7350f000e9c088.tar.bz2
[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
-rw-r--r--compiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp b/compiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp
index a895032..13888cb 100644
--- a/compiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp
+++ b/compiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp
@@ -148,6 +148,7 @@ void GuardedPoolAllocator::uninitTestOnly() {
State.PageSize));
FreeSlots = nullptr;
}
+ *getThreadLocals() = ThreadLocalPackedVariables();
}
void *GuardedPoolAllocator::allocate(size_t Size) {