[PATCH] [compiler-rt] Allow suppression file paths be relative to the location of the executable.

Alexey Samsonov vonosmas at gmail.com
Wed Feb 18 15:45:07 PST 2015


LGTM after addressing a few comments below. Thanks!


================
Comment at: lib/sanitizer_common/sanitizer_posix.cc:301
@@ +300,3 @@
+bool IsAbsolutePath(const char *path) {
+  return IsPathSeparator(path[0]);
+}
----------------
return path != nullptr && IsPathSeparator(path[0])

================
Comment at: lib/sanitizer_common/sanitizer_suppressions.cc:90
@@ +89,3 @@
+    uptr path_to_exec_len = file_name_pos - exec.data();
+    internal_strncat(new_file_path, exec.data(), path_to_exec_len);
+    internal_strncat(new_file_path, file_path,
----------------
Max(path_to_exec_len, new_file_path_size - 1);

================
Comment at: lib/sanitizer_common/sanitizer_suppressions.cc:107
@@ -89,2 +106,3 @@
   char *suppressions_from_file;
   uptr buffer_size;
+  const uptr max_len = 1 << 26;
----------------
Move these declarations closer to the place where they are actually used.

================
Comment at: lib/sanitizer_common/sanitizer_suppressions.cc:127
@@ -95,3 +126,3 @@
     Printf("%s: failed to read suppressions file '%s'\n", SanitizerToolName,
            common_flags()->suppressions);
     Die();
----------------
should this be file_path?

http://reviews.llvm.org/D7309

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






More information about the llvm-commits mailing list