[ASan] Print a hint when the program crashes accessing the zero page.

This may help some users figure out that the error report is valid.

llvm-svn: 218123
This commit is contained in:
Alexander Potapenko 2014-09-19 12:37:00 +00:00
parent 04f9da8f21
commit 53b85c25e0
1 changed files with 3 additions and 0 deletions

View File

@ -630,6 +630,9 @@ void ReportSIGSEGV(const char *description, uptr pc, uptr sp, uptr bp,
" (pc %p bp %p sp %p T%d)\n",
description, (void *)addr, (void *)pc, (void *)bp, (void *)sp,
GetCurrentTidOrInvalid());
if (pc < GetPageSizeCached()) {
Report("Hint: pc points to the zero page.\n");
}
Printf("%s", d.EndWarning());
GET_STACK_TRACE_SIGNAL(pc, bp, context);
stack.Print();