summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Angermann <moritz.angermann@gmail.com>2021-06-15 15:57:18 +0800
committerMatthew Pickering <matthewtpickering@gmail.com>2021-06-17 10:58:14 +0000
commite5893c030b7f58c8afaeca350dd9034582ad48bf (patch)
tree5c4880444b9e803da656702d1135de7119b86a01
parenta0622459f1d9a7068e81b8a707ffc63e153444f8 (diff)
downloadhaskell-wip/angerman/master-adjustor-alloc-mark-split.tar.gz
Guard Allocate Exec via LIBFFI by LIBFFIwip/angerman/master-adjustor-alloc-mark-split
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
-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 37f32de0f5..c285c03388 100644
--- a/rts/sm/Storage.c
+++ b/rts/sm/Storage.c
@@ -1850,7 +1850,7 @@ void freeExec (AdjustorExecutable addr)
RELEASE_SM_LOCK
}
-#elif defined(darwin_HOST_OS)
+#elif defined(USE_LIBFFI_FOR_ADJUSTORS) && defined(darwin_HOST_OS)
static HashTable* allocatedExecs;