[compiler-rt] r334749 - [MSan] Linker-initialize static fallback_mutex in msan_allocator.cc

Alex Shlyapnikov via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 14 11:30:51 PDT 2018


Author: alekseyshl
Date: Thu Jun 14 11:30:51 2018
New Revision: 334749

URL: http://llvm.org/viewvc/llvm-project?rev=334749&view=rev
Log:
[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

Modified:
    compiler-rt/trunk/lib/msan/msan_allocator.cc

Modified: compiler-rt/trunk/lib/msan/msan_allocator.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/msan_allocator.cc?rev=334749&r1=334748&r2=334749&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/msan_allocator.cc (original)
+++ compiler-rt/trunk/lib/msan/msan_allocator.cc Thu Jun 14 11:30:51 2018
@@ -120,7 +120,7 @@ typedef CombinedAllocator<PrimaryAllocat
 
 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);




More information about the llvm-commits mailing list