[PATCH] [LSan] Common leak checking module.

Alexander Potapenko glider at google.com
Thu May 16 04:45:13 PDT 2013



================
Comment at: lib/lsan/lsan_common.cc:225
@@ +224,3 @@
+  StopTheWorld(callback, arg);
+  // Allocator must be unlocked by the callback.
+  UnlockThreadRegistry();
----------------
Am I understanding right that the critical sections protected by the allocator lock and the thread registry lock intersect, but are not nested? This is usually bad. Can you lock the thread registry before the allocator instead?

================
Comment at: lib/lsan/lsan_common.h:71
@@ +70,3 @@
+extern Flags lsan_flags;
+inline Flags *flags() { return &lsan_flags; }
+
----------------
Alexander Potapenko wrote:
> Why not declare this method inside the Flags declaration?
Please disregard my comment. I've misread this line.


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



More information about the llvm-commits mailing list