[PATCH] [ASan] Add process basename to log name and error message to simplify analysis of sanitized systems logs.

Yury Gribov tetra2005 at gmail.com
Thu Jan 29 09:40:32 PST 2015


REPOSITORY
  rL LLVM

================
Comment at: lib/sanitizer_common/sanitizer_common.cc:224
@@ -221,1 +223,3 @@
     return slash_pos + 1;
+  else if (const char *backslash_pos = internal_strrchr(module, '\\'))
+    return backslash_pos + 1;
----------------
samsonov wrote:
> I forgot, why do you need this?
It's for Windows.

================
Comment at: lib/sanitizer_common/sanitizer_printf.cc:258
@@ -257,1 +257,3 @@
+      needed_length += internal_snprintf(buffer, buffer_size,
+                                         "==%s %d==", pname, pid);
       if (needed_length >= buffer_size) {
----------------
samsonov wrote:
> Hm, do we really want this? I believe some users may scrape logs by searching for ==%d== prefix.
Knowing pname may be useful when output from multiple processes gets printed into stderr. Perhaps do ==%d==%s==?

================
Comment at: test/asan/TestCases/verbose-log-path_test.cc:1
@@ +1,2 @@
+// FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=316
+// XFAIL: android
----------------
samsonov wrote:
> Why do you need this?
I simply copy-pasted this from log-path_test.cc and thought that it's better to avoid changes. I could remove useless stuff if necessary.

================
Comment at: test/asan/TestCases/verbose-log-path_test.cc:12
@@ +11,3 @@
+// FIXME: log_path is not supported on Windows yet.
+// XFAIL: win32
+//
----------------
samsonov wrote:
> This test will not be run on Windows anyway - verbose-log-path is not set there.
Ditto.

http://reviews.llvm.org/D7172

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






More information about the llvm-commits mailing list