summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Shlyapnikov <alekseys@google.com>2018-06-14 18:30:51 +0000
committerAlex Shlyapnikov <alekseys@google.com>2018-06-14 18:30:51 +0000
commitc9b41354fffa9dd88f55439d41d2e6908fd4d5fd (patch)
tree94f131e37f75e69d01b6f9a5fca6bd9ea9e0e5df
parent241b75869011979b6b3aa36692e6871e24040cc7 (diff)
downloadbcm5719-llvm-c9b41354fffa9dd88f55439d41d2e6908fd4d5fd.tar.gz
bcm5719-llvm-c9b41354fffa9dd88f55439d41d2e6908fd4d5fd.zip
[MSan] Linker-initialize static fallback_mutex in msan_allocator.cc
Summary: static fallback_mutex in msan_allocator.cc does not need the ctor call and can be linker initialized. Issue: https://github.com/google/sanitizers/issues/194 Reviewers: morehouse, eugenis Subscribers: delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D48145 llvm-svn: 334749
-rw-r--r--compiler-rt/lib/msan/msan_allocator.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/lib/msan/msan_allocator.cc b/compiler-rt/lib/msan/msan_allocator.cc
index 3d03ca42c8c..36f0497a9d8 100644
--- a/compiler-rt/lib/msan/msan_allocator.cc
+++ b/compiler-rt/lib/msan/msan_allocator.cc
@@ -120,7 +120,7 @@ typedef CombinedAllocator<PrimaryAllocator, AllocatorCache,
static Allocator allocator;
static AllocatorCache fallback_allocator_cache;
-static SpinMutex fallback_mutex;
+static StaticSpinMutex fallback_mutex;
void MsanAllocatorInit() {
SetAllocatorMayReturnNull(common_flags()->allocator_may_return_null);
OpenPOWER on IntegriCloud