summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/tests
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
commit126afbb7f9d9c06871f6f2c28e5640504d15dbba (patch)
tree1bfc6b0b4cedb1a0f88443b72b50791934d64cae /lib/sanitizer_common/tests
parent6c73b0681a43fa1d94ac69d8f775f88c3f89f780 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@234602 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/tests')
-rw-r--r--lib/sanitizer_common/tests/sanitizer_stacktrace_test.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sanitizer_common/tests/sanitizer_stacktrace_test.cc b/lib/sanitizer_common/tests/sanitizer_stacktrace_test.cc
index a8bd7261e..654ea1db8 100644
--- a/lib/sanitizer_common/tests/sanitizer_stacktrace_test.cc
+++ b/lib/sanitizer_common/tests/sanitizer_stacktrace_test.cc
@@ -45,7 +45,7 @@ static uptr PC(uptr idx) {
void FastUnwindTest::SetUp() {
size_t ps = GetPageSize();
mapping = MmapOrDie(2 * ps, "FastUnwindTest");
- Mprotect((uptr)mapping, ps);
+ MprotectNoAccess((uptr)mapping, ps);
// Unwinder may peek 1 word down from the starting FP.
fake_stack = (uhwptr *)((uptr)mapping + ps + sizeof(uhwptr));