[PATCH] D15625: Add iOS/watchOS/tvOS support for ASan (llvm part)

Alexey Samsonov via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 22 14:14:40 PST 2016


samsonov added inline comments.

================
Comment at: lib/Transforms/Instrumentation/AddressSanitizer.cpp:70
@@ -69,1 +69,3 @@
 static const uint64_t kDefaultShadowOffset64 = 1ULL << 44;
+static const uint64_t kIOSShadowOffset64 = 0x120200000;
+static const uint64_t kIOSSimShadowOffset32 = 1ULL << 30;
----------------
Please group all IOS constants together.

================
Comment at: lib/Transforms/Instrumentation/AddressSanitizer.cpp:365
@@ -360,1 +364,3 @@
       Mapping.Offset = kFreeBSD_ShadowOffset32;
+    else if (IsIOS && IsX86)
+      Mapping.Offset = kIOSSimShadowOffset32;
----------------
Looks like the order becomes important here. Maybe:
  else if (IsIOS)
    Mapping.Offset = IsX86 ? kIOSSimShadowOffset32 : kIOSShadowOffset32;
here and below? And a comment describing the rationale behind this (I guess, it's just an heuristic, right?)


http://reviews.llvm.org/D15625





More information about the llvm-commits mailing list