[PATCH] D48145: [MSan] Linker-initialize static fallback_mutex in msan_allocator.cc

Aleksey Shlyapnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 13 13:00:05 PDT 2018


alekseyshl created this revision.
alekseyshl added reviewers: morehouse, eugenis.
Herald added subscribers: Sanitizers, delcypher.

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


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D48145

Files:
  lib/msan/msan_allocator.cc


Index: lib/msan/msan_allocator.cc
===================================================================
--- lib/msan/msan_allocator.cc
+++ lib/msan/msan_allocator.cc
@@ -120,7 +120,7 @@
 
 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);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48145.151232.patch
Type: text/x-patch
Size: 441 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180613/c592d856/attachment.bin>


More information about the llvm-commits mailing list