summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_common.cc
diff options
context:
space:
mode:
authorFrancis Ricci <francisjricci@gmail.com>2017-04-17 16:34:38 +0000
committerFrancis Ricci <francisjricci@gmail.com>2017-04-17 16:34:38 +0000
commit7c6bf1cc9f0a084e7b29c74af4833fe5814b3a06 (patch)
tree79dca829f4695d8ca9f8c74ac1da362268c2d03e /compiler-rt/lib/sanitizer_common/sanitizer_procmaps_common.cc
parent84577092ba220afd173dfccf08093bc46f0ebe33 (diff)
downloadbcm5719-llvm-7c6bf1cc9f0a084e7b29c74af4833fe5814b3a06.tar.gz
bcm5719-llvm-7c6bf1cc9f0a084e7b29c74af4833fe5814b3a06.zip
Don't read non-readable address ranges during lsan pointer scanning
Summary: This specifically addresses the Mach-O zero page, which we cannot read from. Reviewers: kubamracek, samsonov, alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32044 llvm-svn: 300456
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_procmaps_common.cc')
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_procmaps_common.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_common.cc b/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_common.cc
index fac3fbdad07..67a659010aa 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_common.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_common.cc
@@ -141,7 +141,8 @@ void MemoryMappingLayout::DumpListOfModules(
uptr base_address = (i ? cur_beg : 0) - cur_offset;
LoadedModule cur_module;
cur_module.set(cur_name, base_address);
- cur_module.addAddressRange(cur_beg, cur_end, prot & kProtectionExecute);
+ cur_module.addAddressRange(cur_beg, cur_end, prot & kProtectionExecute,
+ prot & kProtectionRead);
modules->push_back(cur_module);
}
}
OpenPOWER on IntegriCloud