[compiler-rt] r176091 - [Sanitizer] Don't die if external symbolizer is used on Mac, where it's not implemented yet

Alexey Samsonov samsonov at google.com
Tue Feb 26 05:40:51 PST 2013


Author: samsonov
Date: Tue Feb 26 07:40:51 2013
New Revision: 176091

URL: http://llvm.org/viewvc/llvm-project?rev=176091&view=rev
Log:
[Sanitizer] Don't die if external symbolizer is used on Mac, where it's not implemented yet

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer.cc
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_mac.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer.cc?rev=176091&r1=176090&r2=176091&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer.cc Tue Feb 26 07:40:51 2013
@@ -324,8 +324,8 @@ class Symbolizer {
  private:
   char *SendCommand(bool is_data, const char *module_name, uptr module_offset) {
     // First, try to use internal symbolizer.
-    if (internal_symbolizer_ == 0) {
-      internal_symbolizer_ = InternalSymbolizer::get();
+    if (!IsSymbolizerAvailable()) {
+      return 0;
     }
     if (internal_symbolizer_) {
       return internal_symbolizer_->SendCommand(is_data, module_name,
@@ -360,7 +360,8 @@ class Symbolizer {
           kMaxNumberOfModuleContexts * sizeof(LoadedModule)));
       CHECK(modules_);
       n_modules_ = GetListOfModules(modules_, kMaxNumberOfModuleContexts);
-      CHECK_GT(n_modules_, 0);
+      // FIXME: Return this check when GetListOfModules is implemented on Mac.
+      // CHECK_GT(n_modules_, 0);
       CHECK_LT(n_modules_, kMaxNumberOfModuleContexts);
     }
     for (uptr i = 0; i < n_modules_; i++) {

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_mac.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_mac.cc?rev=176091&r1=176090&r2=176091&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_mac.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_mac.cc Tue Feb 26 07:40:51 2013
@@ -23,7 +23,8 @@ bool StartSymbolizerSubprocess(const cha
 }
 
 uptr GetListOfModules(LoadedModule *modules, uptr max_modules) {
-  UNIMPLEMENTED();
+  // FIXME: Actually implement this on Mac.
+  return 0;
 }
 
 }  // namespace __sanitizer





More information about the llvm-commits mailing list