Skip to content
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

Explicit handling of global variables #311

Merged
merged 4 commits into from
Oct 9, 2018

Conversation

langston-barrett
Copy link
Contributor

This adapts to the changes in GaloisInc/crucible#97.

I don't know how to update the submodule, so I haven't included that here (but am happy to figure it out on Monday).

@atomb
Copy link
Contributor

atomb commented Oct 8, 2018

You can update the crucible submodule to the latest commit on master by doing the following:

(cd deps/crucible && git checkout master && git pull)
git add deps/crucible

Instead, add crucible_global_initializer.

The current behavior of globals is unsound (ref: GaloisInc#203). Instead,
we provide an option for the user to initialize globals as necessary.

It would be best to have more informative error messages when the
symbolic simulator accesses invalid memory because a global hasn't
been initialized.

I initially assumed that `SetupGlobalInitializer name` should have the
same type as `SetupGlobal name`. However, `SetupGlobal` adds a pointer
wrapper (as it should). Instead, we now directly translate the type
of the global's initializer from the LLVM AST.
manual: define auxilary function init_global
This update changes the handling of global variables so that they
aren't automatically initialized. Instead, the user/client has
more granular control.

update CrucibleLLVM API, change LLVMTyCtx -> TypeContext

Crucible replaced a few "Maybe"s with "MonadError String"s.
Instead of throwing that information away, more of it is now
propagated (after the text "Details:")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants