[PATCH] [lsan] Add __lsan_disable() and __lsan_enable().

Kostya Serebryany kcc at google.com
Mon Jun 3 02:33:53 PDT 2013



================
Comment at: lib/asan/asan_allocator2.cc:425
@@ -424,1 +424,3 @@
   }
+  if (t->lsan_disabled())
+    m->lsan_tag = __lsan::kSuppressed;
----------------
I would use the ?: operator 
(not insisting, just suggesting)

================
Comment at: lib/lsan/lsan_allocator.cc:66
@@ -63,1 +65,3 @@
   CHECK(m);
+  if (lsan_disabled)
+    m->tag = kSuppressed;
----------------
"?:" as an option

================
Comment at: lib/lsan/lsan_allocator.cc:208
@@ +207,3 @@
+  }
+  if (__lsan::lsan_disabled) __lsan::lsan_disabled--;
+}
----------------
do you need this second if?


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

BRANCH
  feat/lsan/suppression-hooks

ARCANIST PROJECT
  compiler-rt



More information about the llvm-commits mailing list