[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.

llvm-svn: 312687
This commit is contained in:
Evgeniy Stepanov 2017-09-07 01:35:59 +00:00
parent 4899a923db
commit 7d1ab555ae
1 changed files with 10 additions and 0 deletions

View File

@ -81,6 +81,15 @@ static void ProtectGap(uptr addr, uptr size) {
Die(); 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() { void InitializeShadowMemory() {
// Set the shadow memory address to uninitialized. // Set the shadow memory address to uninitialized.
__asan_shadow_memory_dynamic_address = kDefaultShadowSentinel; __asan_shadow_memory_dynamic_address = kDefaultShadowSentinel;
@ -141,6 +150,7 @@ void InitializeShadowMemory() {
"ASan cannot proceed correctly. ABORTING.\n"); "ASan cannot proceed correctly. ABORTING.\n");
Report("ASan shadow was supposed to be located in the [%p-%p] range.\n", Report("ASan shadow was supposed to be located in the [%p-%p] range.\n",
shadow_start, kHighShadowEnd); shadow_start, kHighShadowEnd);
MaybeReportLinuxPIEBug();
DumpProcessMap(); DumpProcessMap();
Die(); Die();
} }