diff options
author | Jordan Rupprecht <rupprecht@google.com> | 2019-01-18 19:46:00 +0000 |
---|---|---|
committer | Jordan Rupprecht <rupprecht@google.com> | 2019-01-18 19:46:00 +0000 |
commit | 05342ccc9cff16425c0a831fddd510879544a0bf (patch) | |
tree | d86b2dfee6aa9d3a54d6d21aabb6bd7462b6669b /lib/sanitizer_common/sanitizer_procmaps_common.cc | |
parent | 6fc0ad0a5de45f80140620e2dd606f65d547362a (diff) | |
parent | b15181368831966c0ec1824617a4c95853fd1b92 (diff) | |
download | compiler-rt-05342ccc9cff16425c0a831fddd510879544a0bf.tar.gz |
Creating branches/google/stable and tags/google/stable/2019-01-18 from r351319
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/google/stable@351578 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_procmaps_common.cc')
-rw-r--r-- | lib/sanitizer_common/sanitizer_procmaps_common.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/sanitizer_common/sanitizer_procmaps_common.cc b/lib/sanitizer_common/sanitizer_procmaps_common.cc index 1f2b431c7..17d61b6c5 100644 --- a/lib/sanitizer_common/sanitizer_procmaps_common.cc +++ b/lib/sanitizer_common/sanitizer_procmaps_common.cc @@ -80,12 +80,14 @@ MemoryMappingLayout::MemoryMappingLayout(bool cache_enabled) { ReadProcMaps(&data_.proc_self_maps); if (cache_enabled && data_.proc_self_maps.mmaped_size == 0) LoadFromCache(); - CHECK_GT(data_.proc_self_maps.mmaped_size, 0); - CHECK_GT(data_.proc_self_maps.len, 0); Reset(); } +bool MemoryMappingLayout::Error() const { + return data_.current == nullptr; +} + MemoryMappingLayout::~MemoryMappingLayout() { // Only unmap the buffer if it is different from the cached one. Otherwise // it will be unmapped when the cache is refreshed. |