[compiler-rt] r193229 - Make sure ASan always emits an error summary if it reports an error.
Nick Lewycky
nicholas at mxc.ca
Tue Oct 22 23:19:05 PDT 2013
Author: nicholas
Date: Wed Oct 23 01:19:04 2013
New Revision: 193229
URL: http://llvm.org/viewvc/llvm-project?rev=193229&view=rev
Log:
Make sure ASan always emits an error summary if it reports an error.
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=193229&r1=193228&r2=193229&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_report.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_report.cc Wed Oct 23 01:19:04 2013
@@ -550,16 +550,14 @@ class ScopedInErrorReport {
};
static void ReportSummary(const char *error_type, StackTrace *stack) {
- if (!stack->size) return;
+ AddressInfo ai;
if (&getSymbolizer && getSymbolizer()->IsAvailable()) {
- AddressInfo ai;
// Currently, we include the first stack frame into the report summary.
// Maybe sometimes we need to choose another frame (e.g. skip memcpy/etc).
uptr pc = StackTrace::GetPreviousInstructionPc(stack->trace[0]);
getSymbolizer()->SymbolizeCode(pc, &ai, 1);
- ReportErrorSummary(error_type, ai.file, ai.line, ai.function);
}
- // FIXME: do we need to print anything at all if there is no symbolizer?
+ ReportErrorSummary(error_type, ai.file, ai.line, ai.function);
}
void ReportSIGSEGV(uptr pc, uptr sp, uptr bp, uptr addr) {
More information about the llvm-commits
mailing list