[PATCH] [compiler-rt] atos and dladdr symbolizers for OS X

Alexey Samsonov vonosmas at gmail.com
Wed Mar 11 11:54:25 PDT 2015


LGTM after addressing comments below. Thanks!


================
Comment at: lib/sanitizer_common/sanitizer_symbolizer_mac.cc:74
@@ +73,3 @@
+static bool IsAtosErrorMessage(const char *str) {
+  int n = sizeof(kAtosErrorMessages) / sizeof(kAtosErrorMessages[0]);
+  for (int i = 0; i < n; i++) {
----------------
I believe we have ARRAY_SIZE macro for that.

================
Comment at: lib/sanitizer_common/sanitizer_symbolizer_mac.cc:97
@@ +96,3 @@
+    Report("atos returned an error: %s\n", trim);
+    return false;
+  }
----------------
InternalFree(trim);

================
Comment at: lib/sanitizer_common/sanitizer_symbolizer_mac.cc:131
@@ +130,3 @@
+  if (!buf) return false;
+  bool result = ParseCommandOutput(buf, stack);
+  if (!result) {
----------------
You can remove extra temp variable:

  if (!ParseCommandOutput(buf, stack)) {
    process_ = nullptr;
    return false;
  }
  return true;

Add a comment describing why you discard the process in this case.

http://reviews.llvm.org/D6588

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list