[PATCH] [LSan] Common leak checking module.

Sergey Matveev earthdok at google.com
Fri May 17 04:27:15 PDT 2013



================
Comment at: lib/lsan/lsan_common.h:44
@@ +43,3 @@
+// Aligned pointers everywhere.
+const uptr kSourceAllALigned =
+    kSourceGlobals | kSourceStacks | kSourceTLS | kSourceRegisters;
----------------
Kostya Serebryany wrote:
> did you mean Aligned (you have ALligned with capital L)
fixed

================
Comment at: lib/lsan/lsan_common.h:93
@@ +92,3 @@
+  bool IsEmpty() { return leaks_.size() == 0; }
+
+ private:
----------------
Alexander Potapenko wrote:
> Nit: spare newline
Removed them in all small classes.

================
Comment at: lib/lsan/lsan_common.h:180
@@ +179,3 @@
+class LsanMetadata {
+  void *metadata_;
+ public:
----------------
Alexander Potapenko wrote:
> Please put this into a private section.
done

================
Comment at: lib/lsan/lsan_common.cc:89
@@ +88,3 @@
+    // LargeMmapAllocator involves a lock and a linear search. Instead, we
+    // should acquire the list of chunks from secondary allocator and do our own
+    // checking.
----------------
Kostya Serebryany wrote:
> I disagree. We should make GetBlockBegin faster instead of exposing more allocator guts here.
> Please remove the comment starting from "Instead"
ok


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



More information about the llvm-commits mailing list