From 2144efce661dc6faeaed23cd9ee1f31f74c3c956 Mon Sep 17 00:00:00 2001 From: Jost Berthold Date: Thu, 19 Dec 2024 09:33:02 +1100 Subject: [PATCH] Revert "declare all LLVM function imports unsafe: executing thread will block" This reverts commit 207d6b1f2d463f3ef4c47b5ba710836a70e8b23e. The branch crashed in a proof with 16x parallelism, trying with `Safe` calls again to narrow down why. --- booster/library/Booster/LLVM/TH.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/booster/library/Booster/LLVM/TH.hs b/booster/library/Booster/LLVM/TH.hs index 3aaa9c5302..07c2f8880f 100644 --- a/booster/library/Booster/LLVM/TH.hs +++ b/booster/library/Booster/LLVM/TH.hs @@ -89,9 +89,9 @@ foreignImport name' ty' = do libHandle <- TH.newName "libHandle" pure - [ -- foreign import ccall unsafe "dynamic" Unwrap :: FunPtr -> + [ -- foreign import ccall "dynamic" Unwrap :: FunPtr -> TH.ForeignD $ - TH.ImportF TH.CCall TH.Unsafe "dynamic" nameUnwrap $ + TH.ImportF TH.CCall TH.Safe "dynamic" nameUnwrap $ TH.AppT (TH.AppT TH.ArrowT $ TH.AppT (TH.ConT ''FunPtr) ty) ty , -- FunPtr :: ReaderT DL IO (FunPtr ) TH.SigD