From 174f556d49cfeb36a17948297f3f4aa609a74d15 Mon Sep 17 00:00:00 2001 From: wlott <wlott> Date: Mon, 2 Mar 1992 04:10:36 +0000 Subject: [PATCH] Whenever we allocate a chunk of memory, set the protections to include VM_PROT_EXECUTE so that we can execute code on it. --- ldb/mach-os.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ldb/mach-os.c b/ldb/mach-os.c index 90d306eee..7b2c7f5d4 100644 --- a/ldb/mach-os.c +++ b/ldb/mach-os.c @@ -1,5 +1,5 @@ /* - * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/mach-os.c,v 1.3 1991/10/22 18:38:11 wlott Exp $ + * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/mach-os.c,v 1.4 1992/03/02 04:10:36 wlott Exp $ * * OS-dependent routines. This file (along with os.h) exports an * OS-independent interface to the operating system VM facilities. @@ -49,6 +49,9 @@ vm_size_t len; segments = -1; + vm_protect(task_self(), addr, len, TRUE, + VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE); + return addr; } @@ -88,6 +91,9 @@ vm_size_t len; segments = -1; + vm_protect(task_self(), addr, len, TRUE, + VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE); + return addr; } -- GitLab