summaryrefslogtreecommitdiff
path: root/lib/lsan/lsan_common_mac.cc
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-05-22 19:43:56 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-05-22 19:43:56 +0000
commit99ea5e489fa5765bf0eb50ca4261ab5cc20abeeb (patch)
tree4c90812321bc8c987ef756cc5d05af608f7192a2 /lib/lsan/lsan_common_mac.cc
parent834763c1a4849df24fd4f9b466d0c160cf7ed44b (diff)
Diffstat (limited to 'lib/lsan/lsan_common_mac.cc')
-rw-r--r--lib/lsan/lsan_common_mac.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/lsan/lsan_common_mac.cc b/lib/lsan/lsan_common_mac.cc
index 5ee1e228691ab..ae10955439c81 100644
--- a/lib/lsan/lsan_common_mac.cc
+++ b/lib/lsan/lsan_common_mac.cc
@@ -110,7 +110,8 @@ void ProcessGlobalRegions(Frontier *frontier) {
for (const __sanitizer::LoadedModule::AddressRange &range :
modules[i].ranges()) {
- if (range.executable || !range.readable) continue;
+ // Sections storing global variables are writable and non-executable
+ if (range.executable || !range.writable) continue;
ScanGlobalRange(range.beg, range.end, frontier);
}