[compiler-rt] r312687 - [asan] Add a note to shadow memory setup error.
Evgeniy Stepanov via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 6 18:35:59 PDT 2017
Author: eugenis
Date: Wed Sep 6 18:35:59 2017
New Revision: 312687
URL: http://llvm.org/viewvc/llvm-project?rev=312687&view=rev
Log:
[asan] Add a note to shadow memory setup error.
Point to https://github.com/google/sanitizers/issues/856 as a possible cause of the failed mapping.
Modified:
compiler-rt/trunk/lib/asan/asan_shadow_setup.cc
Modified: compiler-rt/trunk/lib/asan/asan_shadow_setup.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_shadow_setup.cc?rev=312687&r1=312686&r2=312687&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_shadow_setup.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_shadow_setup.cc Wed Sep 6 18:35:59 2017
@@ -81,6 +81,15 @@ static void ProtectGap(uptr addr, uptr s
Die();
}
+static void MaybeReportLinuxPIEBug() {
+#if SANITIZER_LINUX && (defined(__x86_64__) || defined(__aarch64__))
+ Report("This might be related to ELF_ET_DYN_BASE change in Linux 4.12.\n");
+ Report(
+ "See https://github.com/google/sanitizers/issues/837 for possible "
+ "workarounds.\n");
+#endif
+}
+
void InitializeShadowMemory() {
// Set the shadow memory address to uninitialized.
__asan_shadow_memory_dynamic_address = kDefaultShadowSentinel;
@@ -141,6 +150,7 @@ void InitializeShadowMemory() {
"ASan cannot proceed correctly. ABORTING.\n");
Report("ASan shadow was supposed to be located in the [%p-%p] range.\n",
shadow_start, kHighShadowEnd);
+ MaybeReportLinuxPIEBug();
DumpProcessMap();
Die();
}
More information about the llvm-commits
mailing list