diff options
author | Kostya Serebryany <kcc@google.com> | 2013-02-15 12:00:24 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2013-02-15 12:00:24 +0000 |
commit | fd61b6f0c811a831c7b3fdbde4186b3975bbfef2 (patch) | |
tree | e4f0c29155cd86b3145943289e6afa37e0752878 /llvm/lib/Support/SourceMgr.cpp | |
parent | 54a8602aefbd75e09fa5371f28f3eeb529b6d9f2 (diff) | |
download | bcm5719-llvm-fd61b6f0c811a831c7b3fdbde4186b3975bbfef2.tar.gz bcm5719-llvm-fd61b6f0c811a831c7b3fdbde4186b3975bbfef2.zip |
[asan] make asan work with 7fff8000 offset and prelink
When prelink is installed in the system, prelink-ed
libraries map between 0x003000000000 and 0x004000000000 thus occupying the shadow Gap,
so we need so split the address space even further, like this:
|| [0x10007fff8000, 0x7fffffffffff] || HighMem ||
|| [0x02008fff7000, 0x10007fff7fff] || HighShadow ||
|| [0x004000000000, 0x02008fff6fff] || ShadowGap3 ||
|| [0x003000000000, 0x003fffffffff] || MidMem ||
|| [0x00087fff8000, 0x002fffffffff] || ShadowGap2 ||
|| [0x00067fff8000, 0x00087fff7fff] || MidShadow ||
|| [0x00008fff7000, 0x00067fff7fff] || ShadowGap ||
|| [0x00007fff8000, 0x00008fff6fff] || LowShadow ||
|| [0x000000000000, 0x00007fff7fff] || LowMem ||
Do it only if necessary.
Also added a bit of profiling code to make sure that the
mapping code is efficient.
Added a lit test to simulate prelink-ed libraries.
Unfortunately, this test does not work with binutils-gold linker.
If gold is the default linker the test silently passes.
Also replaced
__has_feature(address_sanitizer)
with
__has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
in two places.
Patch partially by Jakub Jelinek.
llvm-svn: 175263
Diffstat (limited to 'llvm/lib/Support/SourceMgr.cpp')
0 files changed, 0 insertions, 0 deletions