From 1fe5fab905a9f8e64480389a207a6ee338030fd1 Mon Sep 17 00:00:00 2001 From: Ivan Krasin Date: Wed, 28 Oct 2015 20:45:34 +0000 Subject: [PATCH] sanitizer_common: be more verbose, when symbolizer is not found. Summary: I have othen been stuck when I got an ASAN report, but no symbols are resolved. The reasons might be different, and it always requires a bit of detective work to track down. These more verbose error messages will help the users like me. Reviewers: samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14135 llvm-svn: 251553 --- .../sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc index 0ed236a0f3cc2..a19b0a678629d 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc @@ -446,14 +446,16 @@ static void ChooseSymbolizerTools(IntrusiveList *list, if (SymbolizerTool *tool = ChooseExternalSymbolizer(allocator)) { list->push_back(tool); - } else { - VReport(2, "No internal or external symbolizer found.\n"); } #if SANITIZER_MAC VReport(2, "Using dladdr symbolizer.\n"); list->push_back(new(*allocator) DlAddrSymbolizer()); #endif // SANITIZER_MAC + + if (list->size() == 0) { + Report("WARNING: no internal or external symbolizer found.\n"); + } } Symbolizer *Symbolizer::PlatformInit() {