Add mmap/munmap interceptors.
authorMaxim Ostapenko <m.ostapenko@samsung.com>
Wed, 5 Oct 2016 14:04:08 +0000 (17:04 +0300)
committerIvan Baravy <i.baravy@samsung.com>
Wed, 22 Feb 2017 09:28:18 +0000 (12:28 +0300)
commit4a796107ef71aa9345d13e940de5fc6ca3366863
tree6be66233694d2868f8fc255d70d654a6afc71c4f
parentecb307f395b48cbb537071b8eb214626881a667a
Add mmap/munmap interceptors.

Some allocators may use mmap for their local pools that may cause false positive
reports because LSan currently doesn't intercept mmap call mainly due to its
complexity (we don't know whether a particular mmap would contain live pointers).
However for some cases (e.g. anonymous rw mmaps) we can guess that they would
contain live pointers thus we can add them into root regions. Thus, now we
intercept mmap/munmap calls, add anonymous rw mappings into root regions and
call real mmap.

Change-Id: Ie0bde91497a31ab670f15d67b34d328969dc0981
Signed-off-by: Maxim Ostapenko <m.ostapenko@samsung.com>
libsanitizer/lsan/lsan.cc
libsanitizer/lsan/lsan.h
libsanitizer/lsan/lsan_common.cc
libsanitizer/lsan/lsan_interceptors.cc