diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2013-10-23 06:19:04 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2013-10-23 06:19:04 +0000 |
commit | 4b861aa4b40daabd81fdaed352380ea1c486053a (patch) | |
tree | 2902ec39ce515462a27b897324849ff5da174a7e | |
parent | 7c6bd4060e60f5b148cc629c8791c2a8bf3d3347 (diff) | |
download | compiler-rt-4b861aa4b40daabd81fdaed352380ea1c486053a.tar.gz compiler-rt-4b861aa4b40daabd81fdaed352380ea1c486053a.tar.bz2 compiler-rt-4b861aa4b40daabd81fdaed352380ea1c486053a.tar.xz |
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
-rw-r--r-- | lib/asan/asan_report.cc | 6 |
1 files 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) { |