Skip to content

Commit 7fb4d3d

Browse files
committed
[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 llvm-svn: 318349
1 parent c12c0c5 commit 7fb4d3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler-rt/lib/lsan/lsan.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ void GetStackTrace(__sanitizer::BufferedStackTrace *stack,
6464
extern bool lsan_inited;
6565
extern bool lsan_init_is_running;
6666

67-
extern "C" void __lsan_init();
67+
extern "C" SANITIZER_INTERFACE_ATTRIBUTE void __lsan_init();

0 commit comments

Comments
 (0)