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

Heapster: duplicate read memblocks #1505

Merged
merged 10 commits into from
Nov 12, 2021
Merged

Conversation

eddywestbrook
Copy link
Contributor

This PR changes the implication prover (specifically in proveVarLLVMBlocks) to duplicate read-only memblock permissions when they are used by a proof, so that Rust shared references can be duplicated in code. As part of supporting this change, this PR also:

  • Updated recombinePerm to handle this possibility by dropping redundant memblock perms or parts of memblock perms that are redundant
  • updated implEndLifetimeM to drop conjuncts that are relative to the just-ended lifetime, which could cause the recombinePerm change to drop necessary memblock perms in favor of memblock perms whose lifetimes have ended
  • added the double_dup_ref function to the rust_data example to exercise type-checking Rust reference duplication
  • added a step to simplifyPermsForDetVars to cast the permissions on determined variables as part of simplifying them, in case they contain non-determined variables that are provably equal to determined ones

Eddy Westbrook added 6 commits November 10, 2021 14:47
…o duplicate read-only memblock permissions when they are used by a proof, so that Rust shared references can be duplicated in code; updated recombinePerm to handle this possibility by dropping redundant memblock perms or part of memblock perms that are redundant; also updated implEndLifetimeM to drop conjuncts that are relative to the just-ended lifetime
…termined variables as part of simplifying them, in case they contain non-determined variables that are provably equal to determined ones
@eddywestbrook eddywestbrook requested a review from m-yac November 11, 2021 19:32
Copy link
Contributor

@m-yac m-yac left a comment

Choose a reason for hiding this comment

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

Everything looks good to me!

@m-yac m-yac added the subsystem: heapster Issues specifically related to memory verification using Heapster label Nov 11, 2021
@eddywestbrook eddywestbrook added the PR: ready to merge Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run label Nov 11, 2021
Eddy Westbrook added 2 commits November 11, 2021 15:56
…well as logic to drop redundant fields when they are recombined
…r; also added a case to simplify1PermForDetVars to generalize eq(llvmword e) perms when e has undetermined vars
@mergify mergify bot merged commit dd9026e into master Nov 12, 2021
@mergify mergify bot deleted the heapster/duplicate-read-memblocks branch November 12, 2021 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: ready to merge Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run subsystem: heapster Issues specifically related to memory verification using Heapster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants