Skip to content

Improve instrument_call_statement in code contracts to handle all uses of __CPROVER_allocate #5529

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

Closed
feliperodri opened this issue Oct 15, 2020 · 3 comments
Assignees
Labels
aws Bugs or features of importance to AWS CBMC users Code Contracts Function and loop contracts

Comments

@feliperodri
Copy link
Collaborator

CBMC version: >5.15
Operating system: Ubuntu 18.04 or macOS Mojave 10.14.6
Exact command line resulting in the issue: N/A.
What behaviour did you expect: N/A.
What happened instead:

I'd like to see handling of all uses of __CPROVER_allocate here. malloc is just one such case invoking __CPROVER_allocate. I'd propose a simple analysis that

  1. Checks whether the body of the called function is available,
  2. and if it is, whether the body of that function includes a __CPROVER_allocate call.

Suggested in #5403.

@feliperodri feliperodri added the aws Bugs or features of importance to AWS CBMC users label Oct 15, 2020
@martin-cs
Copy link
Collaborator

I believe __CPROVER_allocate to be an internal interface. I think it should only be used in library functions and in modelling the most primitive access to the heap. User code should not call it.

@feliperodri
Copy link
Collaborator Author

@tautschnig you suggested this here. Do you agree with @martin-cs? Should I keep this open?

@feliperodri feliperodri added the Code Contracts Function and loop contracts label Feb 5, 2021
@feliperodri feliperodri self-assigned this Feb 5, 2021
@feliperodri
Copy link
Collaborator Author

I'll close this for now based on @martin-cs' comment.

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 Code Contracts Function and loop contracts
Projects
None yet
Development

No branches or pull requests

2 participants