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

Evgeniy Stepanov eugenis at google.com
Tue May 26 16:57:24 PDT 2015


================
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);
----------------
samsonov wrote:
>   CHECK_EQ(0, res);
done

================
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);
----------------
samsonov wrote:
> Is it ok to have ~6000 named mappings?
6000 could be ok. We already run the risk of having that many _disjoint_ mappings, because TSan leaves growth room at the end of each one. We can fix it when it happens.


================
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
----------------
samsonov wrote:
> 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.
And CHECK-MSAN-ORIGINS:, too?
Ideally, we should allow any CHECK-XXX to be split into CHECK-XXX-%SAN. I don't think it is possible with lit.

http://reviews.llvm.org/D10039

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






More information about the llvm-commits mailing list