[compiler-rt] r226807 - [ASan] Print out the shadow memory range on shadow mapping failures

Timur Iskhodzhanov timurrrr at google.com
Thu Jan 22 04:05:28 PST 2015


Author: timurrrr
Date: Thu Jan 22 06:05:27 2015
New Revision: 226807

URL: http://llvm.org/viewvc/llvm-project?rev=226807&view=rev
Log:
[ASan] Print out the shadow memory range on shadow mapping failures

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

Modified: compiler-rt/trunk/lib/asan/asan_rtl.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_rtl.cc?rev=226807&r1=226806&r2=226807&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_rtl.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_rtl.cc Thu Jan 22 06:05:27 2015
@@ -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();
   }

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/shadow_mapping_failure.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/shadow_mapping_failure.cc?rev=226807&r1=226806&r2=226807&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/shadow_mapping_failure.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/shadow_mapping_failure.cc Thu Jan 22 06:05:27 2015
@@ -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





More information about the llvm-commits mailing list