Move SanitizerToolName definition before MaybeMountProcFS. 82/96282/2
authorMaxim Ostapenko <m.ostapenko@samsung.com>
Tue, 8 Nov 2016 10:45:49 +0000 (13:45 +0300)
committerDongkyun Son <dongkyun.s@samsung.com>
Wed, 16 Nov 2016 04:57:40 +0000 (20:57 -0800)
The MaybeMountProcFS uses SanitizerToolName in its failure messages so we
need it defined at this point.

Change-Id: I6a568e1ebf3d646ecfbdb53fd8e48910e9b66559
Signed-off-by: Maxim Ostapenko <m.ostapenko@samsung.com>
libsanitizer/asan/asan_rtl.cc
libsanitizer/lsan/lsan.cc

index d4dfc1d..7b5a101 100644 (file)
@@ -407,9 +407,9 @@ static void MaybeDisableUlimit() {
 
 static void AsanInitInternal() {
   if (LIKELY(asan_inited)) return;
+  SanitizerToolName = "AddressSanitizer";
   MaybeMountProcFS();
   MaybeDisableUlimit();
-  SanitizerToolName = "AddressSanitizer";
   CHECK(!asan_init_is_running && "ASan init calls itself!");
   asan_init_is_running = true;
 
index 8d20bb6..33051ce 100644 (file)
@@ -88,9 +88,9 @@ extern "C" void __lsan_init() {
   CHECK(!lsan_init_is_running);
   if (LIKELY(lsan_inited))
     return;
+  SanitizerToolName = "LeakSanitizer";
   MaybeMountProcFS();
   lsan_init_is_running = true;
-  SanitizerToolName = "LeakSanitizer";
   CacheBinaryName();
   InitializeFlags();
   InitCommonLsan();