diff options
author | George Karpenkov <ekarpenkov@apple.com> | 2017-07-10 20:06:06 +0000 |
---|---|---|
committer | George Karpenkov <ekarpenkov@apple.com> | 2017-07-10 20:06:06 +0000 |
commit | de932deda4e6f1cc75151945bdc9aee206ef4fec (patch) | |
tree | 935551c39a2340c2ec7e4933cb1cdfad6b092236 /lib | |
parent | b8c00bd80457207a14e53c316ad857fbc8734f30 (diff) |
Do not crash with missing symbolication when running in DEDUP mode
Printing stacktrace from ASAN crashes with a segfault in DEDUP mode when
symbolication is missing.
Differential Revision: https://reviews.llvm.org/D34914
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307577 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc b/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc index 36c98d057..747a4a701 100644 --- a/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc +++ b/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc @@ -43,7 +43,8 @@ void StackTrace::Print() const { if (dedup_frames-- > 0) { if (dedup_token.length()) dedup_token.append("--"); - dedup_token.append(cur->info.function); + if (cur->info.function != nullptr) + dedup_token.append(cur->info.function); } } frames->ClearAll(); |