[llvm] r242595 - [asan] Fix shadow mapping on Android/AArch64.
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Fri Jul 17 16:51:19 PDT 2015
Author: eugenis
Date: Fri Jul 17 18:51:18 2015
New Revision: 242595
URL: http://llvm.org/viewvc/llvm-project?rev=242595&view=rev
Log:
[asan] Fix shadow mapping on Android/AArch64.
Instrumentation and the runtime library were in disagreement about
ASan shadow offset on Android/AArch64.
This fixes a large number of existing tests on Android/AArch64.
Modified:
llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
Modified: llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?rev=242595&r1=242594&r2=242595&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Fri Jul 17 18:51:18 2015
@@ -337,10 +337,12 @@ static ShadowMapping getShadowMapping(Tr
ShadowMapping Mapping;
- if (LongSize == 32) {
- if (IsAndroid)
- Mapping.Offset = 0;
- else if (IsMIPS32)
+ if (IsAndroid) {
+ // 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)
Mapping.Offset = kMIPS32_ShadowOffset32;
else if (IsFreeBSD)
Mapping.Offset = kFreeBSD_ShadowOffset32;
More information about the llvm-commits
mailing list