Skip to content

Ensure that reachability includes free when using assigns contracts #2700

@JustusAdam

Description

@JustusAdam

When enforcing assigns contracts CBMC expects the presence of a function free, whether or not any heap allocation is used. The current workaround is to include let _ = Box::new(()) in the harness to force free to be included in the emitted GOTO code.

I assume the problem lies in the reachability analysis which does not include free since no memory is ever deallocated from the heap. One option to fix it is to force the inclusion of free in the reachability if a contract is used.

Metadata

Metadata

Labels

[C] BugThis is a bug. Something isn't working.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions