-
Notifications
You must be signed in to change notification settings - Fork 274
CONTRACTS: Fix targett comparison in loop instrumentation #6782
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite agree with the commit message: https://github.com/diffblue/cbmc/blob/develop/src/goto-programs/goto_program.h#L1240..L1245 is what is being invoked here. That's not undefined behaviour, but will be behaviour that may not be as reproducible.
And then also the issue that I commented on below, which might be what resulted in breaking some tests.
Inequality comparison on targett iterators are overloaded to compare raw pointers instead. This led to flakiness: incorrect instrumentation of loop contracts in some runs.
Thanks for the review, @tautschnig and @feliperodri. @tautschnig: I think I have addressed all your comments now. |
This makes sure no one can inadvertently use less-than comparison on those iterators, which may lead to non-reproducible behaviour (see diffblue#6782).
This makes sure no one can inadvertently use less-than comparison on those iterators, which may lead to non-reproducible behaviour (see diffblue#6782).
This makes sure no one can inadvertently use less-than comparison on those iterators, which may lead to non-reproducible behaviour (see diffblue#6782).
This makes sure no one can inadvertently use less-than comparison on those iterators, which may lead to non-reproducible behaviour (see diffblue#6782).
This makes sure no one can inadvertently use less-than comparison on those iterators, which may lead to non-reproducible behaviour (see diffblue#6782).
This makes sure no one can inadvertently use less-than comparison on those iterators, which may lead to non-reproducible behaviour (see diffblue#6782).
This makes sure no one can inadvertently use less-than comparison on those iterators, which may lead to non-reproducible behaviour (see diffblue#6782).
This makes sure no one can inadvertently use less-than comparison on those iterators, which may lead to non-reproducible behaviour (see diffblue#6782).
An inequality comparison on iterators was leading to undefined behavior and flakiness: incorrect instrumentation loop contracts.
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/My commit message includes data points confirming performance improvements (if claimed).