Skip to content

Conversation

viktormalik
Copy link
Collaborator

There is a difference between valid-memtrack and valid-memcleanup properties in SV-COMP. The difference is that memleaks occurring on reach_error should be reported only for the valid-memcleanup property.

This PR adds a new CLI option --memory-cleanup-check.

I added this option to the CBMC version that we use for 2LS here. The idea is that memory leak assertions for abort-like functions are only added if this CLI option is used.

This is implemented on a very old version of CBMC, though, so I'm not sure if it'll be possible to easily port it to the current version. If not, I can move this option into the 2LS wrapper script.

The option is --memory-cleanup-check.

There must be a separate option because memory leaks for programs
containing an error are handled differently for the memsafety and
the memcleanup properties.
Copy link
Member

@peterschrammel peterschrammel left a comment

Choose a reason for hiding this comment

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

I've had ported that fix to a "newer" CBMC version here: diffblue/cbmc#3462
But that's also a while ago now...

@FrNecas
Copy link
Contributor

FrNecas commented Nov 20, 2022

This should be merged -- I once forgot to include this option resulting in unnecessary wrong results :)

@tautschnig
Copy link
Collaborator

I have now pushed an update to diffblue/cbmc#3462 to make things work with current CBMC.

@tautschnig tautschnig merged commit 2c1d56d into diffblue:master Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants