[LSan] Detect dynamic loader by its base address.
authorAlex Shlyapnikov <alekseys@google.com>
Mon, 6 Nov 2017 21:27:06 +0000 (21:27 +0000)
committerAlex Shlyapnikov <alekseys@google.com>
Mon, 6 Nov 2017 21:27:06 +0000 (21:27 +0000)
commit2093b94e70529dbfb0ad8d88143f4e20c2bba116
tree3a30b0db278ce708b2fe7c9132c1e694fb895551
parentf96bedfce301aa3ebaa14968558cfd5e9431818e
[LSan] Detect dynamic loader by its base address.

Summary:
Relanding D38600, which was reverted due to various PPC bot failures.

If it breaks something again, please provide some pointers to broken
bots, not just revert it, otherwise it's very hard to reason what's
wrong with this commit.

Whenever possible (Linux + glibc 2.16+), detect dynamic loader module by
its base address, not by the module name matching. The current name
matching approach fails on some configurations.

Reviewers: eugenis

Subscribers: kubamracek, llvm-commits

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

llvm-svn: 317512
compiler-rt/lib/lsan/lsan_common.cc
compiler-rt/lib/lsan/lsan_common_linux.cc
compiler-rt/lib/sanitizer_common/sanitizer_getauxval.h [new file with mode: 0644]
compiler-rt/lib/sanitizer_common/sanitizer_linux.cc