Add mmap/munmap interceptors. 48/101248/1 accepted/tizen/base/20161216.190341 submit/tizen_base/20161211.223828 submit/tizen_base/20161214.064516
authorMaxim Ostapenko <m.ostapenko@samsung.com>
Wed, 5 Oct 2016 14:04:08 +0000 (17:04 +0300)
committerMaxim Ostapenko <m.ostapenko@samsung.com>
Wed, 30 Nov 2016 12:00:36 +0000 (15:00 +0300)
commit059d7696a8c6ab63d1bf4271a20629e76fcd392e
tree444084d61ed04d11fd700402ddba5485ee946be5
parent9c2785c174d07a35414709ebde53b1c30e1d139a
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