From e754ff7f178a629a2261cba77a29d9510391aebd Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Sat, 13 Feb 2021 16:44:19 +0800 Subject: Allocate Adjustors and mark them readable in two steps This drops allocateExec for darwin, and replaces it with a alloc, write, mark executable strategy instead. This prevents us from trying to allocate an executable range and then write to it, which X^W will prohibit on darwin. This will *only* work if we can use mmap. --- rts/StgCRun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rts/StgCRun.c') diff --git a/rts/StgCRun.c b/rts/StgCRun.c index 536ee45835..f1148139e2 100644 --- a/rts/StgCRun.c +++ b/rts/StgCRun.c @@ -849,7 +849,7 @@ StgRun(StgFunPtr f, StgRegTable *basereg) { ".globl " STG_RETURN "\n\t" THUMB_FUNC -#if !defined(ios_HOST_OS) +#if !(defined(ios_HOST_OS) || defined(darwin_HOST_OS)) ".type " STG_RETURN ", %%function\n" #endif STG_RETURN ":\n\t" -- cgit v1.2.1