diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2018-12-29 02:06:19 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2018-12-29 02:06:19 +0100 |
commit | ed66acb291eb698530b20e82667e1b6c450c7cfc (patch) | |
tree | 6748d8a084520ff64f28819fa556af001c4842e6 /extra | |
parent | c5a5eaa9a996015517c1ebbce19551c6e650cba1 (diff) | |
download | mariadb-git-ed66acb291eb698530b20e82667e1b6c450c7cfc.tar.gz |
Silence LeakSanitizer by default in mariabackup, so that phanthom "leaks"
would not hide more interesting information, like invalid memory accesses.
some "leaks" are expected
- partly this is due to weird options parsing, that runs twice, and
does not free memory after the first run.
- also we do not mind to exit() whenever it makes sense, without full
cleanup.
Diffstat (limited to 'extra')
-rw-r--r-- | extra/mariabackup/xtrabackup.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index d2b241a28f5..df8e1e245fc 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -6844,3 +6844,12 @@ int main(int argc, char **argv) exit(EXIT_SUCCESS); } + + +#if defined (__SANITIZE_ADDRESS__) && defined (__linux__) +/* Avoid LeakSanitizer's false positives. */ +const char* __asan_default_options() +{ + return "detect_leaks=0"; +} +#endif |