summaryrefslogtreecommitdiff
path: root/lib/lsan
diff options
context:
space:
mode:
authorAlex Shlyapnikov <alekseys@google.com>2017-11-15 23:42:48 +0000
committerAlex Shlyapnikov <alekseys@google.com>2017-11-15 23:42:48 +0000
commit98668e97e7eb0604b86d4e608317c20798b14a01 (patch)
treeef55ba6e264ddc7859b18fa0b0a20c04725c72e9 /lib/lsan
parentb1d0cfb1e9600f014484173b0b5d11743f67ce3a (diff)
[LSan] Export __lsan_init
Summary: lsan_preinit.cc is meant to be linked into executable and calls lsan_init from .preinit_array section. But if liblsan is a shared library, then this doesn't work, because the symbol is not exported. This patch fixes that. The counterparts like asan_init or __tsan_init already do have SANITIZER_INTERFACE_ATTRIBUTE. Committing on behalf of jakubjelinek. Reviewers: alekseyshl, kcc Subscribers: llvm-commits Differential revision: https://reviews.llvm.org/D39889 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@318349 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/lsan')
-rw-r--r--lib/lsan/lsan.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/lsan/lsan.h b/lib/lsan/lsan.h
index 43c41653b..6baee81d0 100644
--- a/lib/lsan/lsan.h
+++ b/lib/lsan/lsan.h
@@ -64,4 +64,4 @@ void GetStackTrace(__sanitizer::BufferedStackTrace *stack,
extern bool lsan_inited;
extern bool lsan_init_is_running;
-extern "C" void __lsan_init();
+extern "C" SANITIZER_INTERFACE_ATTRIBUTE void __lsan_init();