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

Kostya Serebryany kcc at google.com
Mon Feb 2 18:41:52 PST 2015


Alexey, any comments? 
We already pick up the default blacklist from the compiler distribution at compile time. 
The default suppressions are better to be similar.


================
Comment at: lib/sanitizer_common/sanitizer_suppressions.cc:87
@@ +86,3 @@
+  if (ReadBinaryName(exec.data(), exec.size())) {
+    if (const char *slash_pos = internal_strrchr(exec.data(), '/')) {
+      uptr path_to_exec_len = slash_pos - exec.data() + 1;
----------------
this is probably unfriendly to windows. 

================
Comment at: lib/sanitizer_common/sanitizer_suppressions.cc:114
@@ +113,3 @@
+  InternalScopedString new_file_path(kMaxPathLength);
+  if (!FileExists(file_path) && file_path[0] != '/' &&
+      GetPathRelativeToExec(new_file_path.data(), file_path)) {
----------------
ditto

http://reviews.llvm.org/D7309

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






More information about the llvm-commits mailing list