Skip to content

Fix pointer havocing within loop invariant contracts #5961

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

Merged
merged 1 commit into from
Mar 20, 2021

Conversation

SaswatPadhi
Copy link
Contributor

Fixes #5960.

Please see the linked bug report for more information.

  • Each commit message has a non-empty body, explaining why the change was made.
  • NA Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • NA The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • NA My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • NA White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@feliperodri feliperodri added aws Bugs or features of importance to AWS CBMC users bugfix Code Contracts Function and loop contracts labels Mar 19, 2021
@SaswatPadhi SaswatPadhi force-pushed the loop_modifies_fix branch 3 times, most recently from 6d2d6e7 to e303519 Compare March 19, 2021 22:17
Copy link
Collaborator

@feliperodri feliperodri left a comment

Choose a reason for hiding this comment

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

LGTM.

The `__CPROVER_loop_invariant` contract used to incorrectly havoc the underlying pointer location instead of just havocing the value at the memory location. This commit fixes this.
@codecov
Copy link

codecov bot commented Mar 19, 2021

Codecov Report

Merging #5961 (867168c) into develop (4c58926) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #5961   +/-   ##
========================================
  Coverage    74.23%   74.24%           
========================================
  Files         1431     1431           
  Lines       155291   155290    -1     
========================================
+ Hits        115287   115290    +3     
+ Misses       40004    40000    -4     
Impacted Files Coverage Δ
src/goto-instrument/loop_utils.cpp 93.02% <0.00%> (+8.93%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1feb6e4...867168c. Read the comment docs.

@SaswatPadhi SaswatPadhi changed the title Fix pointer havocing by loop invariant contracts Fix pointer havocing within loop invariant contracts Mar 20, 2021
@feliperodri feliperodri merged commit e166f4c into diffblue:develop Mar 20, 2021
@SaswatPadhi SaswatPadhi deleted the loop_modifies_fix branch March 20, 2021 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws Bugs or features of importance to AWS CBMC users bugfix Code Contracts Function and loop contracts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Loop invariant contract havocs a pointer instead of havocing its value
4 participants