[PATCH] [sanitizer] Decorate /proc/self/maps.

Alexey Samsonov vonosmas at gmail.com
Tue May 26 16:43:26 PDT 2015


Nice.


REPOSITORY
  rL LLVM

================
Comment at: lib/sanitizer_common/sanitizer_posix.cc:160
@@ +159,3 @@
+  int res = internal_ftruncate(fd, size);
+  CHECK_EQ(res, 0);
+  res = shm_unlink(shmname);
----------------
  CHECK_EQ(0, res);

================
Comment at: lib/tsan/rtl/tsan_rtl.cc:71
@@ +70,3 @@
+  char name[50];
+  internal_snprintf(name, sizeof(name), "trace %u", tid);
+  MapThreadTrace(GetThreadTrace(tid), TraceSize() * sizeof(Event), name);
----------------
Is it ok to have ~6000 named mappings?

================
Comment at: test/msan/decorate_proc_maps.cc:1
@@ +1,2 @@
+// RUN: %clangxx_msan -g %s -o %t
+// RUN: MSAN_OPTIONS=decorate_proc_maps=1 %run %t 2>&1 | FileCheck %s
----------------
I'd really prefer to have the test under test/sanitizer_common. If needed, we may introduce CHECK-%SAN substitution to combine `CHECK-ASAN:`, `CHECK-MSAN:` and `CHECK-TSAN:` in the same file.

http://reviews.llvm.org/D10039

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






More information about the llvm-commits mailing list