blob: 363cc14f1941ba53e76b0e2b2f2c32cbb103825e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
//===-- lsan_testlib.cc ---------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file is a part of LeakSanitizer.
// Standalone LSan tool as a shared library, to be used with LD_PRELOAD.
//
//===----------------------------------------------------------------------===//
/* Usage:
clang++ ../sanitizer_common/sanitizer_*.cc ../interception/interception_*.cc \
lsan*.cc tests/lsan_testlib.cc -I. -I.. -g -ldl -lpthread -fPIC -shared -O2 \
-o lsan.so
LD_PRELOAD=./lsan.so /your/app
*/
#include "lsan.h"
__attribute__((constructor))
void constructor() {
__lsan::Init();
}
|