diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2015-07-29 18:22:25 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2015-07-29 18:22:25 +0000 |
commit | 4d81f86d976466a38a3bd75365587b7c84f72d41 (patch) | |
tree | 171be8bd9553b2e82eb59ed2d92eb2fd874ba049 /llvm/lib/Transforms/Instrumentation | |
parent | ea087056aeea20e7b294575023a22b50a6cd8c97 (diff) | |
download | bcm5719-llvm-4d81f86d976466a38a3bd75365587b7c84f72d41.tar.gz bcm5719-llvm-4d81f86d976466a38a3bd75365587b7c84f72d41.zip |
[asan] Remove special case mapping on Android/AArch64.
ASan shadow on Android starts at address 0 for both historic and
performance reasons. This is possible because the platform mandates
-pie, which makes lower memory region always available.
This is not such a good idea on 64-bit platforms because of MAP_32BIT
incompatibility.
This patch changes Android/AArch64 mapping to be the same as that of
Linux/AAarch64.
llvm-svn: 243548
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp index 5dde5fed0d2..47b736f3cd1 100644 --- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -340,12 +340,12 @@ static ShadowMapping getShadowMapping(Triple &TargetTriple, int LongSize, ShadowMapping Mapping; - if (IsAndroid) { + if (LongSize == 32) { // Android is always PIE, which means that the beginning of the address // space is always available. - Mapping.Offset = 0; - } else if (LongSize == 32) { - if (IsMIPS32) + if (IsAndroid) + Mapping.Offset = 0; + else if (IsMIPS32) Mapping.Offset = kMIPS32_ShadowOffset32; else if (IsFreeBSD) Mapping.Offset = kFreeBSD_ShadowOffset32; |