[PATCH] D14135: sanitizer_common: be more verbose, when symbolizer is not found.

Ivan Krasin via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 27 15:25:45 PDT 2015


krasin created this revision.
krasin added a reviewer: samsonov.
krasin added a subscriber: llvm-commits.

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.

http://reviews.llvm.org/D14135

Files:
  lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc

Index: lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
===================================================================
--- lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
+++ lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
@@ -383,7 +383,7 @@
   const char *path = common_flags()->external_symbolizer_path;
   const char *binary_name = path ? StripModuleName(path) : "";
   if (path && path[0] == '\0') {
-    VReport(2, "External symbolizer is explicitly disabled.\n");
+    Report("WARNING: External symbolizer is explicitly disabled.\n");
     return nullptr;
   } else if (!internal_strcmp(binary_name, "llvm-symbolizer")) {
     VReport(2, "Using llvm-symbolizer at user-specified path: %s\n", path);
@@ -424,6 +424,10 @@
       return new(*allocator) Addr2LinePool(found_path, allocator);
     }
   }
+  // Symbolization is requested, but we can't find a symbolizer to use.
+  Report("ERROR: symbolization is requested, but a symbolizer could "
+         "not be found: external symbolizer is not set, and there's "
+         "no llvm-symbolizer or addr2line in PATH\n");
   return nullptr;
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14135.38604.patch
Type: text/x-patch
Size: 1139 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151027/506e1716/attachment.bin>


More information about the llvm-commits mailing list