[PATCH] D40679: [sanitizer] Introduce a vDSO aware time function, and use it in the allocator [redo]

Aleksey Shlyapnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 1 10:24:08 PST 2017


alekseyshl added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_linux_libcdep.cc:672
+extern "C" SANITIZER_WEAK_ATTRIBUTE void *__vdso_clock_gettime;
+bool CanUseVDSO() {
+  return !SANITIZER_FREEBSD && !SANITIZER_NETBSD &&
----------------
This name is a bit too generic, can we change it to something like CanUseLibcClockGetTime()?


================
Comment at: lib/sanitizer_common/sanitizer_linux_libcdep.cc:690
+  } else {
+    internal_clock_gettime(CLOCK_MONOTONIC, &ts);
+  }
----------------
Does it mean that our allocator is going to be slow on BSD? Should we turn release to OS off by default there then?


https://reviews.llvm.org/D40679





More information about the llvm-commits mailing list