diff options
author | Alexey Samsonov <vonosmas@gmail.com> | 2016-01-14 18:50:09 +0000 |
---|---|---|
committer | Alexey Samsonov <vonosmas@gmail.com> | 2016-01-14 18:50:09 +0000 |
commit | eec20284cbdced192a2f6bb68d90f47ebc2d8452 (patch) | |
tree | 437e269740733359124a81974ccf03477b32f114 /lib/lsan/lsan.cc | |
parent | d52305f4916260a39039d8a8ba5262375867a4c4 (diff) |
[LSan] Use __tls_get_addr interceptor to keep track of dynamic TLS.
Summary:
We have a way to keep track of allocated DTLS segments: let's use it
in LSan. Although this code is fragile and relies on glibc
implementation details, in some cases it proves to be better than
existing way of tracking DTLS in LSan: marking as "reachable" all
memory chunks allocated directly by "ld".
The plan is to eventually get rid of the latter, once we are sure
it's safe to remove.
Reviewers: kcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16164
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@257785 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/lsan/lsan.cc')
-rw-r--r-- | lib/lsan/lsan.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/lsan/lsan.cc b/lib/lsan/lsan.cc index f3e6ad7c9..9c6735919 100644 --- a/lib/lsan/lsan.cc +++ b/lib/lsan/lsan.cc @@ -43,6 +43,7 @@ static void InitializeFlags() { cf.CopyFrom(*common_flags()); cf.external_symbolizer_path = GetEnv("LSAN_SYMBOLIZER_PATH"); cf.malloc_context_size = 30; + cf.intercept_tls_get_addr = true; cf.detect_leaks = true; cf.exitcode = 23; OverrideCommonFlags(cf); |