From 4b861aa4b40daabd81fdaed352380ea1c486053a Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Wed, 23 Oct 2013 06:19:04 +0000 Subject: Make sure ASan always emits an error summary if it reports an error. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193229 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/asan/asan_report.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/asan/asan_report.cc b/lib/asan/asan_report.cc index c62e00be..3b410ca7 100644 --- a/lib/asan/asan_report.cc +++ b/lib/asan/asan_report.cc @@ -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) { -- cgit v1.2.3