summaryrefslogtreecommitdiff
path: root/os_dep.c
diff options
context:
space:
mode:
authorivmai <ivmai>2010-08-18 20:40:23 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:54 +0200
commitb9656770ca7fc0ba5889d2bdea779a5561b685e6 (patch)
tree0db8a7523519651f2fafee2c87e030ada58031f4 /os_dep.c
parentcad3c6153bc6a617f985b3cceb3329eeb4aff96f (diff)
2010-08-18 Ivan Maidanski <ivmai@mail.ru> (with help from Andreas Tobler)
* os_dep.c (PROTECT, UNPROTECT): Correct VM_PROT_EXEC to VM_PROT_EXECUTE.
Diffstat (limited to 'os_dep.c')
-rw-r--r--os_dep.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/os_dep.c b/os_dep.c
index 4ff20b1..b5a3b36 100644
--- a/os_dep.c
+++ b/os_dep.c
@@ -2881,14 +2881,16 @@ GC_INNER void GC_remove_protection(struct hblk *h, word nblocks,
STATIC mach_port_t GC_task_self = 0;
# define PROTECT(addr,len) \
if(vm_protect(GC_task_self,(vm_address_t)(addr),(vm_size_t)(len), \
- FALSE, VM_PROT_READ \
- | (pages_executable ? VM_PROT_EXEC : 0)) != KERN_SUCCESS) { \
+ FALSE, VM_PROT_READ \
+ | (pages_executable ? VM_PROT_EXECUTE : 0)) \
+ != KERN_SUCCESS) { \
ABORT("vm_protect (PROTECT) failed"); \
}
# define UNPROTECT(addr,len) \
if(vm_protect(GC_task_self,(vm_address_t)(addr),(vm_size_t)(len), \
- FALSE, (VM_PROT_READ | VM_PROT_WRITE) \
- | (pages_executable ? VM_PROT_EXEC : 0)) != KERN_SUCCESS) { \
+ FALSE, (VM_PROT_READ | VM_PROT_WRITE) \
+ | (pages_executable ? VM_PROT_EXECUTE : 0)) \
+ != KERN_SUCCESS) { \
ABORT("vm_protect (UNPROTECT) failed"); \
}
# else