[PATCH] Do not sanitize kernel area on 32-bit targets

Kostya Serebryany kcc at google.com
Wed Mar 26 04:47:10 PDT 2014



================
Comment at: lib/asan/asan_mapping.h:122
@@ -113,1 +121,3 @@
+#define kShadowGapEnd   ((kMidMemBeg ? kMidShadowBeg \
+                                     : MEM_TO_SHADOW(kHighShadowEnd + 1)) - 1)
 
----------------
why do you need this? 

================
Comment at: lib/asan/asan_rtl.cc:568
@@ -567,1 +567,3 @@
     ProtectGap(kShadowGapBeg, kShadowGapEnd - kShadowGapBeg + 1);
+    // Allow accesses to unprotected part of address space
+    CHECK(kShadowGapEnd == kHighShadowBeg - 1);
----------------
is the comment still relevant?

================
Comment at: lib/asan/asan_rtl.cc:569
@@ -568,1 +568,3 @@
+    // Allow accesses to unprotected part of address space
+    CHECK(kShadowGapEnd == kHighShadowBeg - 1);
   } else if (kMidMemBeg &&
----------------
use CHECK_EQ(a, b)


http://llvm-reviews.chandlerc.com/D3119



More information about the llvm-commits mailing list