diff options
author | Sergey Matveev <earthdok@google.com> | 2013-08-01 14:57:07 +0000 |
---|---|---|
committer | Sergey Matveev <earthdok@google.com> | 2013-08-01 14:57:07 +0000 |
commit | 41f15402521b7af66c2aa8e0ad4a056fc8166dd9 (patch) | |
tree | 32408b9bbc137777ecb34e596a96acb64c3f54f0 /lib/sanitizer_common/sanitizer_flags.h | |
parent | 534e2ba5188e1a74b340f9507755806357835f62 (diff) |
[lsan] Add leak_check_at_exit flag.
We needed a way to tell LSan to invoke leak checking only if __do_leak_check()
is called explicitly. This can now be achieved by setting
leak_check_at_exit=false.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187578 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_flags.h')
-rw-r--r-- | lib/sanitizer_common/sanitizer_flags.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_flags.h b/lib/sanitizer_common/sanitizer_flags.h index f3f4a26f0..d1a2961b6 100644 --- a/lib/sanitizer_common/sanitizer_flags.h +++ b/lib/sanitizer_common/sanitizer_flags.h @@ -41,6 +41,10 @@ struct CommonFlags { const char *log_path; // Enable memory leak detection. bool detect_leaks; + // Invoke leak checking in an atexit handler. Has no effect if + // detect_leaks=false, or if __lsan_do_leak_check() is called before the + // handler has a chance to run. + bool leak_check_at_exit; }; extern CommonFlags common_flags_dont_use_directly; |