Skip to content

Handle functions with mangled names in contract replacement #6363

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
Sep 24, 2021

Conversation

feliperodri
Copy link
Collaborator

@feliperodri feliperodri commented Sep 23, 2021

Signed-off-by: Felipe R. Monteiro [email protected]

In some cases, we use source_location to retrieve information (e.g., function name). However, if we are consuming a goto_programt, but also care about the name of that function, then it must be passed separately. We should not try to infer it via some means, such as the source location. In this case, apply_function_contract must also consume a function_id, so we can properly retrieve the symbol for the caller function.

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • 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).
  • My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@feliperodri feliperodri added bugfix aws Bugs or features of importance to AWS CBMC users Code Contracts Function and loop contracts labels Sep 23, 2021
@feliperodri feliperodri self-assigned this Sep 23, 2021
@codecov
Copy link

codecov bot commented Sep 23, 2021

Codecov Report

Merging #6363 (790ad51) into develop (35bd785) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 790ad51 differs from pull request most recent head ec9ac5f. Consider uploading reports for the commit ec9ac5f to get more accurate results
Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #6363   +/-   ##
========================================
  Coverage    75.90%   75.90%           
========================================
  Files         1515     1515           
  Lines       164004   164005    +1     
========================================
+ Hits        124483   124484    +1     
  Misses       39521    39521           
Impacted Files Coverage Δ
src/goto-instrument/contracts/contracts.h 100.00% <ø> (ø)
src/goto-instrument/contracts/contracts.cpp 94.16% <100.00%> (+0.01%) ⬆️

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 98bbe74...ec9ac5f. Read the comment docs.

Copy link
Contributor

@SaswatPadhi SaswatPadhi left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks! :D

@feliperodri feliperodri merged commit c3d7235 into diffblue:develop Sep 24, 2021
@feliperodri feliperodri deleted the handle-mangled-names branch September 24, 2021 22: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.

2 participants