[LSan] Add new experimental option for checking long-running processes. 80/159380/9
authorMichail Kashkarov <m.kashkarov@partner.samsung.com>
Thu, 19 Oct 2017 19:02:41 +0000 (22:02 +0300)
committerDongkyun Son <dongkyun.s@samsung.com>
Fri, 21 Sep 2018 07:10:03 +0000 (07:10 +0000)
commit8900c2dadede9375b85de4b467694e7e4f5daefa
treebb26caf8c27472557c856442e071fe0d9f4e72b7
parent5493fd8ece76a701e4a48b3e2a13575cc15255a5
[LSan] Add new experimental option for checking long-running processes.

New LSan option: leak_check_interval_s:
Spawns a background thread at startup which periodically do recoverable
leak check with given interval.

Report files (if log_path option != stderr|stdout) are appended with
prefix "in-progress" and for the DoLeakCheck() call at exit -
are restores back.

System daemons can be leak sanitized right after system startup by adding
"Environment=LSAN_OPTIONS=...:leak_check_interval_s=60"
field in the systemd service file for leak checking every 60 seconds.

Change-Id: Ia78044ec45092f0de96818bd0114d4c7a49cb7e1
libsanitizer/lsan/lsan.cc
libsanitizer/lsan/lsan_common.cc
libsanitizer/lsan/lsan_common.h
libsanitizer/lsan/lsan_common_linux.cc
libsanitizer/lsan/lsan_interceptors.cc
libsanitizer/sanitizer_common/sanitizer_common.cc
libsanitizer/sanitizer_common/sanitizer_common.h
libsanitizer/sanitizer_common/sanitizer_flags.inc
libsanitizer/sanitizer_common/sanitizer_posix.cc