-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update crucible and macaw submodules, changes to x86 initial stack #1110
Conversation
src/SAWScript/Crucible/LLVM/X86.hs
Outdated
@@ -235,11 +237,13 @@ llvm_verify_x86 (Some (llvmModule :: LLVMModule x)) path nm globsyms checkSat se | |||
opts <- getOptions | |||
basic_ss <- getBasicSS | |||
sym <- liftIO $ newSAWCoreBackend sc | |||
rw <- getTopLevelRW | |||
cacheTermsSetting <- liftIO $ W4.getOptionSetting W4.B.cacheTerms $ W4.getConfiguration sym | |||
_ <- liftIO $ W4.setOpt cacheTermsSetting $ rwWhat4HashConsing rw |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes enable_what4_hash_consing
do the expected thing
@@ -304,7 +308,7 @@ llvm_verify_x86 (Some (llvmModule :: LLVMModule x)) path nm globsyms checkSat se | |||
pure | |||
( C.cfgHandle funcCFG | |||
, st & C.stateContext . C.functionBindings | |||
%~ C.insertHandleMap (C.cfgHandle funcCFG) (C.UseCFG funcCFG $ C.postdomInfo funcCFG) | |||
%~ C.FnBindings . C.insertHandleMap (C.cfgHandle funcCFG) (C.UseCFG funcCFG $ C.postdomInfo funcCFG) . C.fnBindings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update for GaloisInc/crucible@049000a
@@ -322,7 +326,7 @@ llvm_verify_x86 (Some (llvmModule :: LLVMModule x)) path nm globsyms checkSat se | |||
Macaw.macawExtensions (Macaw.x86_64MacawEvalFn sfs) mvar | |||
(mkGlobalMap . Map.singleton 0 $ preState ^. x86GlobalBase) | |||
funcLookup noExtraValidityPred | |||
, C._functionBindings = C.insertHandleMap (C.cfgHandle cfg) (C.UseCFG cfg $ C.postdomInfo cfg) C.emptyHandleMap | |||
, C._functionBindings = C.FnBindings $ C.insertHandleMap (C.cfgHandle cfg) (C.UseCFG cfg $ C.postdomInfo cfg) C.emptyHandleMap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update for GaloisInc/crucible@049000a
insertHandleMap (cfgHandle cfg) (UseCFG cfg (postdomInfo cfg)) $ | ||
emptyHandleMap | ||
, _functionBindings = FnBindings $ | ||
insertHandleMap (cfgHandle cfg) (UseCFG cfg (postdomInfo cfg)) emptyHandleMap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update for GaloisInc/crucible@049000a
@@ -1082,7 +1082,7 @@ setupGlobals opts gs fs s | |||
let halloc = simHandleAllocator (st ^. stateContext) | |||
h <- mkHandle halloc fname | |||
let addBinding = over (stateContext . functionBindings) | |||
(insertHandleMap h (UseOverride o)) | |||
(FnBindings . insertHandleMap h (UseOverride o) . fnBindings) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update for GaloisInc/crucible@049000a
I think the problem with the
I'm going to add a distinct option for What4 hash consing during simulation and see if that works out. It's unfortunately quite ugly and cumbersome to pile up more options in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, please take a look at the inline comments
(This PR bundles two somewhat-related changes for the next https://github.com/GaloisInc/blst-verification release, in the interest of expediency. GaloisInc/what4#105 is also relevant in that context, and I plan to bump that submodule here as well if there are no strong objections.)
The changes to x86 verification amount to increasing the alignment of the base of RSP while shrinking the alignment of the initial offset. The actual alignment of the initial RSP remains 16 bytes. This makes it more viable to verify code that performs bitwise operations on pointers derived from RSP (given GaloisInc/macaw#192).