summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Angermann <moritz.angermann@gmail.com>2021-06-15 15:57:18 +0800
committerZubin Duggal <zubin.duggal@gmail.com>2021-09-21 22:28:29 +0530
commitbefbb1374377978f8c228538c61ca193b155c1da (patch)
treed192dca55d145227fb4154539f5c3fffe31da3f7
parentba9761a0ee95040672f57702715b37c78669013a (diff)
downloadhaskell-befbb1374377978f8c228538c61ca193b155c1da.tar.gz
Guard Allocate Exec via LIBFFI by LIBFFI
We now have two darwin flavours. AArch64-Darwin, and x86_64-darwin, the latter one which has proper custom adjustor support, the former though relies on libffi. Mixing both leads to odd crashes, as the closures might not fit the size of the libffi closures. Hence this needs to be guarded by the USE_LBFFI_FOR_ADJUSTORS guard. Original patch by Hamish Mackenzie (cherry picked from commit e5893c030b7f58c8afaeca350dd9034582ad48bf)
-rw-r--r--rts/sm/Storage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c
index b28ada7f97..2885900e43 100644
--- a/rts/sm/Storage.c
+++ b/rts/sm/Storage.c
@@ -1746,7 +1746,7 @@ void freeExec (AdjustorExecutable addr)
RELEASE_SM_LOCK
}
-#elif (defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH)) && (defined(ios_HOST_OS) || defined(darwin_HOST_OS))
+#elif defined(USE_LIBFFI_FOR_ADJUSTORS) && defined(darwin_HOST_OS)
static HashTable* allocatedExecs;