[LSan] Report the missing linker only when the linker is actually missing. 48/192248/4
authorAlex Shlyapnikov <alekseys@google.com>
Mon, 15 May 2017 23:11:01 +0000 (23:11 +0000)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Fri, 11 Jan 2019 13:29:04 +0000 (16:29 +0300)
Reviewers: eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D33218

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@303129 91177308-0d34-0410-b5e6-96231b3b80d8

Backport:
  http://llvm.org/git/compiler-rt 4ba4036

Change-Id: I1c01e8679206af77fcd971a8fed5b8dde0e42b15

libsanitizer/lsan/lsan_common_linux.cc

index d49c3c0..f63b891 100644 (file)
@@ -49,8 +49,10 @@ void InitializePlatformSpecificModules() {
       return;
     }
   }
-  VReport(1, "LeakSanitizer: Dynamic linker not found. "
-             "TLS will not be handled correctly.\n");
+  if (linker == nullptr) {
+    VReport(1, "LeakSanitizer: Dynamic linker not found. "
+               "TLS will not be handled correctly.\n");
+  }
 }
 
 static int ProcessGlobalRegionsCallback(struct dl_phdr_info *info, size_t size,