summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Lee <waltl@google.com>2018-05-16 23:36:01 +0000
committerWalter Lee <waltl@google.com>2018-05-16 23:36:01 +0000
commitc5368c230eb4f866a2f1681b3929ed182afa0a4d (patch)
tree32ba8e988ee78f351b82bd4bab2b97208cbc1e44
parenta8da1f8ee4293ea6b4711ed33ca192bc6ec796f4 (diff)
downloadbcm5719-llvm-c5368c230eb4f866a2f1681b3929ed182afa0a4d.tar.gz
bcm5719-llvm-c5368c230eb4f866a2f1681b3929ed182afa0a4d.zip
[asan] Add a magic shadow value for shadw gap
This gives us something to insert into the shadow gap for systems that don't have memory protection turned on there (i.e. on Myriad). Differential Revision: https://reviews.llvm.org/D46457 llvm-svn: 332557
-rw-r--r--compiler-rt/lib/asan/asan_errors.cc1
-rw-r--r--compiler-rt/lib/asan/asan_internal.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/lib/asan/asan_errors.cc b/compiler-rt/lib/asan/asan_errors.cc
index 02e243b127c..bd007e5c563 100644
--- a/compiler-rt/lib/asan/asan_errors.cc
+++ b/compiler-rt/lib/asan/asan_errors.cc
@@ -514,6 +514,7 @@ static void PrintLegend(InternalScopedString *str) {
PrintShadowByte(str, " ASan internal: ", kAsanInternalHeapMagic);
PrintShadowByte(str, " Left alloca redzone: ", kAsanAllocaLeftMagic);
PrintShadowByte(str, " Right alloca redzone: ", kAsanAllocaRightMagic);
+ PrintShadowByte(str, " Shadow gap: ", kAsanShadowGap);
}
static void PrintShadowBytes(InternalScopedString *str, const char *before,
diff --git a/compiler-rt/lib/asan/asan_internal.h b/compiler-rt/lib/asan/asan_internal.h
index 19133e5291a..4a4635229d0 100644
--- a/compiler-rt/lib/asan/asan_internal.h
+++ b/compiler-rt/lib/asan/asan_internal.h
@@ -147,6 +147,9 @@ const int kAsanArrayCookieMagic = 0xac;
const int kAsanIntraObjectRedzone = 0xbb;
const int kAsanAllocaLeftMagic = 0xca;
const int kAsanAllocaRightMagic = 0xcb;
+// Used to populate the shadow gap for systems without memory
+// protection there (i.e. Myriad).
+const int kAsanShadowGap = 0xcc;
static const uptr kCurrentStackFrameMagic = 0x41B58AB3;
static const uptr kRetiredStackFrameMagic = 0x45E0360E;
OpenPOWER on IntegriCloud