[compiler-rt] r218123 - [ASan] Print a hint when the program crashes accessing the zero page.
Alexander Potapenko
glider at google.com
Fri Sep 19 05:37:00 PDT 2014
Author: glider
Date: Fri Sep 19 07:37:00 2014
New Revision: 218123
URL: http://llvm.org/viewvc/llvm-project?rev=218123&view=rev
Log:
[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.
Modified:
compiler-rt/trunk/lib/asan/asan_report.cc
Modified: compiler-rt/trunk/lib/asan/asan_report.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_report.cc?rev=218123&r1=218122&r2=218123&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_report.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_report.cc Fri Sep 19 07:37:00 2014
@@ -630,6 +630,9 @@ void ReportSIGSEGV(const char *descripti
" (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();
More information about the llvm-commits
mailing list