[PATCH] Add the way to disable LSan at link time.

Alexey Samsonov samsonov at google.com
Thu Jun 27 00:48:21 PDT 2013



================
Comment at: include/sanitizer/lsan_interface.h:28
@@ -27,1 +27,3 @@
   void __lsan_ignore_object(const void *p);
+  // The user may optionally provide this function to disallow the leak checking
+  // for the program it is linked into. Note: this function may be called late,
----------------
Sergey Matveev wrote:
> s/the leak checking/leak checking/
Done

================
Comment at: lib/lsan/lit_tests/TestCases/link_turned_off.cc:8
@@ +7,3 @@
+int __lsan_is_turned_off() {
+  return 1;
+}
----------------
Sergey Matveev wrote:
> Can you please make this 
> return (argc > 1);
> and add a sanity test?
Done

================
Comment at: lib/lsan/lsan_common.cc:448
@@ +447,3 @@
+
+#if !SANITIZER_SUPPORTS_WEAK_HOOKS
+SANITIZER_WEAK_ATTRIBUTE SANITIZER_INTERFACE_ATTRIBUTE
----------------
Sergey Matveev wrote:
> Also, we can probably drop this given that we're targeting only x86_64 Linux.
Let's leave it for consistency w/ other cross-platform tools.


http://llvm-reviews.chandlerc.com/D1044



More information about the llvm-commits mailing list