summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/asan/asan_rtl.cc
diff options
context:
space:
mode:
authorTimur Iskhodzhanov <timurrrr@google.com>2015-04-10 15:02:19 +0000
committerTimur Iskhodzhanov <timurrrr@google.com>2015-04-10 15:02:19 +0000
commitea1f332b793f44c1100341077da5de92aa68a0af (patch)
treeff8995bfae7bf044edb1ce16b384d6a9b53f54aa /compiler-rt/lib/asan/asan_rtl.cc
parent3a09ef64ee591678a2549fe18c46e50a85cbaa5f (diff)
downloadbcm5719-llvm-ea1f332b793f44c1100341077da5de92aa68a0af.tar.gz
bcm5719-llvm-ea1f332b793f44c1100341077da5de92aa68a0af.zip
Split Mprotect into MmapNoAccess and MprotectNoAccess to be more portable
On Windows, we have to know if a memory to be protected is mapped or not. On POSIX, Mprotect was semantically different from mprotect most people know. llvm-svn: 234602
Diffstat (limited to 'compiler-rt/lib/asan/asan_rtl.cc')
-rw-r--r--compiler-rt/lib/asan/asan_rtl.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/lib/asan/asan_rtl.cc b/compiler-rt/lib/asan/asan_rtl.cc
index fcdfe5b4337..30a63c77870 100644
--- a/compiler-rt/lib/asan/asan_rtl.cc
+++ b/compiler-rt/lib/asan/asan_rtl.cc
@@ -298,7 +298,7 @@ static void InitializeHighMemEnd() {
}
static void ProtectGap(uptr a, uptr size) {
- void *res = Mprotect(a, size);
+ void *res = MmapNoAccess(a, size);
if (a == (uptr)res)
return;
Report("ERROR: Failed to protect the shadow gap. "
OpenPOWER on IntegriCloud