diff options
author | Timur Iskhodzhanov <timurrrr@google.com> | 2015-04-10 15:02:19 +0000 |
---|---|---|
committer | Timur Iskhodzhanov <timurrrr@google.com> | 2015-04-10 15:02:19 +0000 |
commit | 126afbb7f9d9c06871f6f2c28e5640504d15dbba (patch) | |
tree | 1bfc6b0b4cedb1a0f88443b72b50791934d64cae /lib/sanitizer_common/sanitizer_posix.h | |
parent | 6c73b0681a43fa1d94ac69d8f775f88c3f89f780 (diff) | |
download | compiler-rt-126afbb7f9d9c06871f6f2c28e5640504d15dbba.tar.gz |
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/sanitizer_posix.h')
-rw-r--r-- | lib/sanitizer_common/sanitizer_posix.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_posix.h b/lib/sanitizer_common/sanitizer_posix.h index bb1eb354c..a3377a851 100644 --- a/lib/sanitizer_common/sanitizer_posix.h +++ b/lib/sanitizer_common/sanitizer_posix.h @@ -37,6 +37,7 @@ uptr internal_write(fd_t fd, const void *buf, uptr count); uptr internal_mmap(void *addr, uptr length, int prot, int flags, int fd, u64 offset); uptr internal_munmap(void *addr, uptr length); +int internal_mprotect(void *addr, uptr length, int prot); // OS uptr internal_filesize(fd_t fd); // -1 on error. |