From acb7894d16752a5c612ce2edf7523e038b8a8fb1 Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Mon, 29 Nov 2021 15:40:13 -0500 Subject: [PATCH] Adapt to GaloisInc/crucible#928 This bumps the `crucible` submodule to include GaloisInc/crucible#928. The `crucible` changes require adding some additional `?memOpts :: MemOptions` constraints to various functions. --- deps/crucible | 2 +- src/SAWScript/Crucible/LLVM/Builtins.hs | 7 ++++++- src/SAWScript/Crucible/LLVM/Override.hs | 14 ++++++++++++-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/deps/crucible b/deps/crucible index f7a994dd0c..c811db88db 160000 --- a/deps/crucible +++ b/deps/crucible @@ -1 +1 @@ -Subproject commit f7a994dd0cddfdf4bdbe5590a8e345e8e69926d6 +Subproject commit c811db88db74110c99903f98f70c0f48bee46485 diff --git a/src/SAWScript/Crucible/LLVM/Builtins.hs b/src/SAWScript/Crucible/LLVM/Builtins.hs index 87eee244b7..a781fc2a88 100644 --- a/src/SAWScript/Crucible/LLVM/Builtins.hs +++ b/src/SAWScript/Crucible/LLVM/Builtins.hs @@ -936,7 +936,12 @@ setupGlobalAllocs cc mspec mem0 = foldM go mem0 $ mspec ^. MS.csGlobalAllocs -- function spec, write the given value to the address of the given -- pointer. setupPrePointsTos :: forall arch. - (?lc :: Crucible.TypeContext, ?w4EvalTactic :: W4EvalTactic, Crucible.HasPtrWidth (Crucible.ArchWidth arch), Crucible.HasLLVMAnn Sym) => + ( ?lc :: Crucible.TypeContext + , ?memOpts :: Crucible.MemOptions + , ?w4EvalTactic :: W4EvalTactic + , Crucible.HasPtrWidth (Crucible.ArchWidth arch) + , Crucible.HasLLVMAnn Sym + ) => MS.CrucibleMethodSpecIR (LLVM arch) -> Options -> LLVMCrucibleContext arch -> diff --git a/src/SAWScript/Crucible/LLVM/Override.hs b/src/SAWScript/Crucible/LLVM/Override.hs index d926c80cab..0a0e2f439e 100644 --- a/src/SAWScript/Crucible/LLVM/Override.hs +++ b/src/SAWScript/Crucible/LLVM/Override.hs @@ -1625,6 +1625,7 @@ instantiateExtResolveSAWSymBV sc cc w tm = do -- Return a map containing the overwritten memory allocations. invalidateMutableAllocs :: ( ?lc :: Crucible.TypeContext + , ?memOpts :: Crucible.MemOptions , ?w4EvalTactic :: W4EvalTactic , Crucible.HasPtrWidth (Crucible.ArchWidth arch) , Crucible.HasLLVMAnn Sym @@ -1818,7 +1819,12 @@ executeGhost _sc _var (TypedTerm tp _) = -- the CrucibleSetup block. First we compute the value indicated by -- 'val', and then write it to the address indicated by 'ptr'. executePointsTo :: - (?lc :: Crucible.TypeContext, ?w4EvalTactic :: W4EvalTactic, Crucible.HasPtrWidth (Crucible.ArchWidth arch), Crucible.HasLLVMAnn Sym) => + ( ?lc :: Crucible.TypeContext + , ?memOpts :: Crucible.MemOptions + , ?w4EvalTactic :: W4EvalTactic + , Crucible.HasPtrWidth (Crucible.ArchWidth arch) + , Crucible.HasLLVMAnn Sym + ) => Options -> SharedContext -> LLVMCrucibleContext arch -> @@ -1849,7 +1855,11 @@ executePointsTo opts sc cc spec overwritten_allocs (LLVMPointsTo _loc cond ptr v writeGlobal memVar mem' storePointsToValue :: - (?w4EvalTactic :: W4EvalTactic, Crucible.HasPtrWidth (Crucible.ArchWidth arch), Crucible.HasLLVMAnn Sym) => + ( ?memOpts :: Crucible.MemOptions + , ?w4EvalTactic :: W4EvalTactic + , Crucible.HasPtrWidth (Crucible.ArchWidth arch) + , Crucible.HasLLVMAnn Sym + ) => Options -> LLVMCrucibleContext arch -> Map AllocIndex (LLVMPtr (Crucible.ArchWidth arch)) ->