summaryrefslogtreecommitdiff
path: root/include/sanitizer/lsan_interface.h
AgeCommit message (Collapse)Author
2017-12-21[sanitizer] Make function declarations C-compatiblePetr Hosek
The public sanitizer headers are intended to be usable from either C++ or C, but they declare no-argument functions with the syntax that is not a proper prototype declaration in C. This goes unnoticed until someone uses -Wsystem-headers. Patch By: mcgrathr Reviewers: phosek, vitalybuka Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D41475 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@321305 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-22[lsan] Add __lsan_default_optionsVitaly Buka
For consistency with asan, msan, tsan and ubsan. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@314048 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-08Prevent DCE on __lsan_is_turned_off and re-enable test caseFrancis Ricci
Summary: -dead_strip in ld64 strips weak interface symbols, which I believe is most likely the cause of this test failure. Re-enable after marking the interface function as used. Reviewers: alekseyshl, kubamracek, kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37635 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312824 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-21[Sanitizers] Unify the semantics and usage of "exitcode" runtime flag across ↵Alexey Samsonov
all sanitizers. Summary: Merge "exitcode" flag from ASan, LSan, TSan and "exit_code" from MSan into one entity. Additionally, make sure sanitizer_common now uses the value of common_flags()->exitcode when dying on error, so that this flag will automatically work for other sanitizers (UBSan and DFSan) as well. User-visible changes: * "exit_code" MSan runtime flag is now deprecated. If explicitly specified, this flag will take precedence over "exitcode". The users are encouraged to migrate to the new version. * __asan_set_error_exit_code() and __msan_set_exit_code() functions are removed. With few exceptions, we don't support changing runtime flags during program execution - we can't make them thread-safe. The users should use __sanitizer_set_death_callback() that would call _exit() with proper exit code instead. * Plugin tools (LSan and UBSan) now inherit the exit code of the parent tool. In particular, this means that ASan would now crash the program with exit code "1" instead of "23" if it detects leaks. Reviewers: kcc, eugenis Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12120 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@245734 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-24[lsan] Add an interface function for on-demand leak checking.Sergey Matveev
Summary: Add an interface function which can be used to periodically trigger leak detection in a long-running process. NB: The meaning of the kIgnored tag has been changed to allow easy clean-up between subsequent leak checks. Previously, this tag was applied to explicitly ignored (i.e. with __lsan_disable() or __lsan_ignore_object()) chunks *and* any chunks only reachable from those. With this change, it's only applied to explicitly ignored chunks. Reviewers: samsonov Reviewed By: samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9159 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@235728 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-24Revert r235726 "interface"Sergey Matveev
Accidentally committed from local branch. :( git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@235727 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-24interfaceSergey Matveev
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@235726 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15[lsan] remove LeakSanitizerIsTurnedOffForTheCurrentProcess (this was a bad ↵Kostya Serebryany
idea), leave __lsan_is_turned_off git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@199304 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-13[lsan] Add __lsan_default_suppressions() to the public interface header.Sergey Matveev
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@199121 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-10[lsan] rename __lsan_is_turned_off to ↵Kostya Serebryany
LeakSanitizerIsTurnedOffForTheCurrentProcess (leave the old variant for now for compatibility) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@198921 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17[lsan] Introduce __lsan_(un)register_root_region().Sergey Matveev
Add an interface for telling LSan that a region of memory is to be treated as a source of live pointers. Useful for code which stores pointers in mapped memory. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@197489 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05Lint fixesAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187726 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-18[lsan] Add __lsan_do_leak_check() to the public interface.Sergey Matveev
Let users override the normal behavior to run leak checking earlier in the process. Also fix a couple nits here and there. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186581 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-27[LSan] Add the way to disable LSan at link timeAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185066 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-06[lsan] Implement __lsan_ignore_object().Sergey Matveev
Leak annotation similar to HeapChecker's IgnoreObject(). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183412 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-03[lsan] Add __lsan_disable() and __lsan_enable().Sergey Matveev
Objects allocated after a call to __lsan_disable() will be treated as live memory. Also add a ScopedDisabler. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183099 91177308-0d34-0410-b5e6-96231b3b80d8