[PATCH] D28609: [lsan] Enable LSan for x86 Linux.

Yury Gribov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 08:03:21 PST 2017


ygribov added inline comments.


================
Comment at: lib/lsan/lsan_interceptors.cc:166
 INTERCEPTOR_ATTRIBUTE
-void *operator new(uptr size) { OPERATOR_NEW_BODY; }
+void *operator new(size_t size) { OPERATOR_NEW_BODY; }
 INTERCEPTOR_ATTRIBUTE
----------------
Why didn't you like uptrs?


================
Comment at: lib/sanitizer_common/sanitizer_flags.inc:65
     "Verbosity level (0 - silent, 1 - a bit of output, 2+ - more output).")
-COMMON_FLAG(bool, detect_leaks, true, "Enable memory leak detection.")
+COMMON_FLAG(bool, detect_leaks, (SANITIZER_WORDSIZE == 64),
+            "Enable memory leak detection.")
----------------
Redundant ().


================
Comment at: lib/sanitizer_common/sanitizer_linux.h:53
 uptr internal_clone(int (*fn)(void *), void *child_stack, int flags, void *arg,
                     int *parent_tidptr, void *newtls, int *child_tidptr);
 #endif
----------------
I thought we had implementation for arm as well?


================
Comment at: test/lsan/TestCases/large_allocation_leak.cc:6
 
+// UNSUPPORTED: x86
+
----------------
This may deserve explanatory comment.


================
Comment at: test/lsan/TestCases/use_tls_dynamic.cc:18
+
+__attribute__((noinline)) int Test(int argc, char *argv[]) {
   std::string path = std::string(argv[0]) + "-so.so";
----------------
Looks like a hack to get test passing...


Repository:
  rL LLVM

https://reviews.llvm.org/D28609





More information about the llvm-commits mailing list