[ASan] Print out the shadow memory range on shadow mapping failures
authorTimur Iskhodzhanov <timurrrr@google.com>
Thu, 22 Jan 2015 12:05:27 +0000 (12:05 +0000)
committerTimur Iskhodzhanov <timurrrr@google.com>
Thu, 22 Jan 2015 12:05:27 +0000 (12:05 +0000)
llvm-svn: 226807

compiler-rt/lib/asan/asan_rtl.cc
compiler-rt/test/asan/TestCases/Windows/shadow_mapping_failure.cc

index 953935b1ca69cef13aab34ad247bb92968bd44be..558b7c7ff77b95d6131cb19610c2124a5584a293 100644 (file)
@@ -386,6 +386,8 @@ static void AsanInitInternal() {
   } else {
     Report("Shadow memory range interleaves with an existing memory mapping. "
            "ASan cannot proceed correctly. ABORTING.\n");
+    Report("ASan shadow was supposed to be located in the [%p-%p] range.\n",
+           shadow_start, kHighShadowEnd);
     DumpProcessMap();
     Die();
   }
index 8858b8099f0e32cc47327712968cf366f77bdc6b..385db20f98d621d9697e3603c653994f532943b6 100644 (file)
@@ -10,6 +10,7 @@ int main() {
   scanf("%s", bigchunk);
 // CHECK-NOT: Hello, world!
 // CHECK: Shadow memory range interleaves with an existing memory mapping.
+// CHECK: ASan shadow was supposed to be located in the [0x3fff0000-0x{{.*}}ffff] range.
 // CHECK: Dumping process modules:
 // CHECK-DAG: 0x{{[0-9a-f]*}}-0x{{[0-9a-f]*}} {{.*}}shadow_mapping_failure
 // CHECK-DAG: 0x{{[0-9a-f]*}}-0x{{[0-9a-f]*}} {{.*}}kernel32.dll