summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Angermann <moritz.angermann@gmail.com>2021-06-15 15:57:18 +0800
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-06-20 07:11:58 -0400
commita6a8d3f57294f6319d778821e52d5dbef867b360 (patch)
treed1043f80a117c7ff1ae1f481e17ff17a5fa08a4f
parent4c87a3d1d14f9e28c8aa0f6062e9c4201f469ad7 (diff)
downloadhaskell-a6a8d3f57294f6319d778821e52d5dbef867b360.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
-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;