diff options
| author | Kostya Serebryany <kcc@google.com> | 2013-10-18 17:46:43 +0000 |
|---|---|---|
| committer | Kostya Serebryany <kcc@google.com> | 2013-10-18 17:46:43 +0000 |
| commit | 8bb5d602356521e1b76a76d618456dfab150724b (patch) | |
| tree | cac2f36dfcc3497b35ec98ac4b29bf0afcd6d1a5 /compiler-rt/lib/asan/asan_stack.cc | |
| parent | 8ec10efc5d210c460aea11d31e0d1acd6af233ed (diff) | |
| download | bcm5719-llvm-8bb5d602356521e1b76a76d618456dfab150724b.tar.gz bcm5719-llvm-8bb5d602356521e1b76a76d618456dfab150724b.zip | |
[asan] fix stack trace printing on Mac
llvm-svn: 192990
Diffstat (limited to 'compiler-rt/lib/asan/asan_stack.cc')
| -rw-r--r-- | compiler-rt/lib/asan/asan_stack.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/lib/asan/asan_stack.cc b/compiler-rt/lib/asan/asan_stack.cc index aec75818db5..cbc151cc1ba 100644 --- a/compiler-rt/lib/asan/asan_stack.cc +++ b/compiler-rt/lib/asan/asan_stack.cc @@ -25,6 +25,10 @@ static bool MaybeCallAsanSymbolize(const void *pc, char *out_buffer, } void PrintStack(const uptr *trace, uptr size) { + if (!trace) { + Printf("<empty stack>\n"); + return; + } StackTrace::PrintStack(trace, size, common_flags()->symbolize, MaybeCallAsanSymbolize); } |

