[PATCH] [lsan] Add an interface function for on-demand leak checking.
Sergey Matveev
earthdok at google.com
Tue Apr 21 13:12:19 PDT 2015
In http://reviews.llvm.org/D9159#159457, @samsonov wrote:
> Leaking symbolization is an issue... Let me know if you want to investigate it, or delegate it to me.
Fixed in r235411
================
Comment at: include/sanitizer/lsan_interface.h:61
@@ +60,3 @@
+ // affected by them.
+ int __lsan_do_extra_leak_check();
+
----------------
samsonov wrote:
> Bikeshedding suggestion from me:
> __lsan_do_recoverable_leak_check()
I'll have to give this another thought before landing.
================
Comment at: lib/lsan/lsan_common.cc:333
@@ +332,3 @@
+static void ResetTagsCb(uptr chunk, void *arg) {
+ chunk = GetUserBegin(chunk);
+ LsanMetadata m(chunk);
----------------
samsonov wrote:
> Add
> void(arg)
> to defeat unused-variable warning?
done
================
Comment at: lib/lsan/lsan_common.cc:443
@@ -426,1 +442,3 @@
+ bool have_leaks = CheckForLeaks();
+ if (have_leaks) {
if (flags()->exitcode) {
----------------
samsonov wrote:
> if (!have_leaks)
> return;
> <more code>
>
done
http://reviews.llvm.org/D9159
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list