summaryrefslogtreecommitdiff
path: root/include/sanitizer
diff options
context:
space:
mode:
authorSergey Matveev <earthdok@google.com>2014-01-13 17:26:57 +0000
committerSergey Matveev <earthdok@google.com>2014-01-13 17:26:57 +0000
commit91e60e70a22b35bc1d93319c602fbe18954ed984 (patch)
tree7b339379372ed220bffbd5f74941b94f729254c1 /include/sanitizer
parentaf1a056e95f011138e2e02252cba7ac98b9b67a6 (diff)
downloadcompiler-rt-91e60e70a22b35bc1d93319c602fbe18954ed984.tar.gz
[lsan] Add __lsan_default_suppressions() to the public interface header.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@199121 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/sanitizer')
-rw-r--r--include/sanitizer/lsan_interface.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/include/sanitizer/lsan_interface.h b/include/sanitizer/lsan_interface.h
index 4ff0a49ae..dcfdf05c4 100644
--- a/include/sanitizer/lsan_interface.h
+++ b/include/sanitizer/lsan_interface.h
@@ -41,6 +41,14 @@ extern "C" {
void __lsan_register_root_region(const void *p, size_t size);
void __lsan_unregister_root_region(const void *p, size_t size);
+ // Calling this function makes LSan enter the leak checking phase immediately.
+ // Use this if normal end-of-process leak checking happens too late (e.g. if
+ // you have intentional memory leaks in your shutdown code). Calling this
+ // function overrides end-of-process leak checking; it must be called at
+ // most once per process. This function will terminate the process if there
+ // are memory leaks and the exit_code flag is non-zero.
+ void __lsan_do_leak_check();
+
// The user may optionally provide this function to disallow leak checking
// for the program it is linked into (if the return value is non-zero). This
// function must be defined as returning a constant value; any behavior beyond
@@ -52,13 +60,9 @@ extern "C" {
// LeakSanitizerIsTurnedOffForTheCurrentProcess is used.
int __lsan_is_turned_off();
- // Calling this function makes LSan enter the leak checking phase immediately.
- // Use this if normal end-of-process leak checking happens too late (e.g. if
- // you have intentional memory leaks in your shutdown code). Calling this
- // function overrides end-of-process leak checking; it must be called at
- // most once per process. This function will terminate the process if there
- // are memory leaks and the exit_code flag is non-zero.
- void __lsan_do_leak_check();
+ // This function may be optionally provided by the user and should return
+ // a string containing LSan suppressions.
+ const char *__lsan_default_suppressions();
#ifdef __cplusplus
} // extern "C"