[PATCH] [asan] LSan hooks in asan_rtl

Sergey Matveev earthdok at google.com
Tue May 21 05:58:19 PDT 2013



================
Comment at: lib/asan/asan_flags.h:112
@@ -111,1 +111,3 @@
+  // Invoke LeakSanitizer at process exit.
+  bool sanitize_leaks;
 };
----------------
Alexander Potapenko wrote:
> Kostya Serebryany wrote:
> > maybe find_leaks or check_leaks or just leaks?
> "detect_leaks"?
done

================
Comment at: lib/asan/asan_rtl.cc:191
@@ +190,3 @@
+
+#if SANITIZE_LEAKS
+  if (f->sanitize_leaks && !f->use_stack_depot) {
----------------
Kostya Serebryany wrote:
> why #if ? 
changed as discussed offline

================
Comment at: lib/asan/asan_rtl.cc:462
@@ -450,1 +461,3 @@
 
+#if SANITIZE_LEAKS
+  if (flags()->sanitize_leaks) {
----------------
Kostya Serebryany wrote:
> why #if ? 
I removed this #if and instead define this function as a no-op if !CAN_SANITIZE_LEAKS

================
Comment at: lib/asan/asan_rtl.cc:547
@@ -529,1 +546,3 @@
 
+#ifdef SANITIZE_LEAKS
+  __lsan::InitCommonLsan();
----------------
Kostya Serebryany wrote:
> Why #if?
ditto


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



More information about the llvm-commits mailing list