[LSan] Fix one source of stale segments in the process memory mapping.
authorAlex Shlyapnikov <alekseys@google.com>
Tue, 28 Nov 2017 22:15:27 +0000 (22:15 +0000)
committerAlex Shlyapnikov <alekseys@google.com>
Tue, 28 Nov 2017 22:15:27 +0000 (22:15 +0000)
commit15b71ea6466dd17eabf51d33fedf004fb7e9f852
tree97e62c1cbcdebd1af554f4d771f5e8e6d666d9e0
parent2445b0ccac97245b04beeb43377d0d1e7b08c899
[LSan] Fix one source of stale segments in the process memory mapping.

Summary:
Load process memory map after updating the same cache to reflect the
umap happening in the process of updating.
Also clear out the buffer in case of failed read of /proc/self/maps (not
the source of stale segments, but can lead to the similar crash).

Reviewers: eugenis

Subscribers: llvm-commits, kubamracek

Differential Revision: https://reviews.llvm.org/D40529

llvm-svn: 319237
compiler-rt/lib/sanitizer_common/sanitizer_procmaps_common.cc
compiler-rt/lib/sanitizer_common/sanitizer_procmaps_linux.cc