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

Add support for SMT array backed pointers in writeMemWithAllocationCheck #777

Merged
merged 2 commits into from
Jul 23, 2021

Conversation

bboston7
Copy link
Contributor

This pull request adds support for pointer values backed by SMT arrays in writeMemWithAllocationCheck, which would previously generate failing goals for this case.

@travitch
Copy link
Contributor

How hard would it be to add a test?

It could just:

  1. Malloc two blocks
  2. Store the second pointer into the first block
  3. Read the pointer back
  4. Assert that the symbolic value read from the original pointer vs the read pointer produce an identical result

@bboston7
Copy link
Contributor Author

It seems like it shouldn't be hard to add that test. I'll add it.

@bboston7
Copy link
Contributor Author

@travitch The changes I just pushed up add the test you mentioned.

@travitch
Copy link
Contributor

Thanks! I'll defer to @andreistefanescu for the review, but it looks good to me

@robdockins
Copy link
Contributor

If I understand correctly, this will cause the SMT array to no longer be used for writes once a pointer is written into that block. I don't know if that is the behavior you want. Presumably, if you were OK with that, you wouldn't be using SMT arrays in the first place.

@travitch
Copy link
Contributor

Yes, it isn't ideal for sure. Without this change, the memory model just asserts false, which is somewhat less helpful. There is currently nowhere to store the (symbolic) block ID in the memory model. I'm hoping to address that soon to avoid the need for this case.

Copy link
Contributor

@andreistefanescu andreistefanescu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bboston7 bboston7 merged commit 8eca93a into master Jul 23, 2021
@bboston7 bboston7 deleted the writeMemWithAllocationCheck-pointers branch July 27, 2021 18:50
RyanGlScott pushed a commit to GaloisInc/ambient-verifier that referenced this pull request Mar 1, 2023
This change updates the Crucible submodule to the tip of master now that
GaloisInc/crucible#777 has been merged in.
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.

None yet

4 participants