-
Notifications
You must be signed in to change notification settings - Fork 274
Enum range check #4972
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
Enum range check #4972
Conversation
Why does only one build fail with error:
whereas all other builds succeed? |
Most likely that's a build using |
@smowton Thanks, this seems to work :) |
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.
This PR failed Diffblue compatibility checks (cbmc commit: ec750ef).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/121635227
Status will be re-evaluated on next push.
Common spurious failures include: the cbmc commit has disappeared in the mean time (e.g. in a force-push); the author is not in the list of contributors (e.g. first-time contributors); compatibility was already broken by an earlier merge.
ec750ef
to
66d7172
Compare
66d7172
to
9938747
Compare
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.
This PR failed Diffblue compatibility checks (cbmc commit: 66d7172).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/121771820
Status will be re-evaluated on next push.
Common spurious failures include: the cbmc commit has disappeared in the mean time (e.g. in a force-push); the author is not in the list of contributors (e.g. first-time contributors); compatibility was already broken by an earlier merge.
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.
This PR failed Diffblue compatibility checks (cbmc commit: 9938747).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/121772613
Status will be re-evaluated on next push.
Common spurious failures include: the cbmc commit has disappeared in the mean time (e.g. in a force-push); the author is not in the list of contributors (e.g. first-time contributors); compatibility was already broken by an earlier merge.
Codecov Report
@@ Coverage Diff @@
## develop #4972 +/- ##
===========================================
+ Coverage 69.24% 69.25% +<.01%
===========================================
Files 1309 1309
Lines 108453 108475 +22
===========================================
+ Hits 75096 75119 +23
+ Misses 33357 33356 -1
Continue to review full report at Codecov.
|
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.
This PR failed Diffblue compatibility checks (cbmc commit: a895b40).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/122197970
Status will be re-evaluated on next push.
Common spurious failures include: the cbmc commit has disappeared in the mean time (e.g. in a force-push); the author is not in the list of contributors (e.g. first-time contributors); compatibility was already broken by an earlier merge.
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.
Couple of minor nitpicks, and you should squash the last two fixup commits into the "main" two wherever is appropriate, then LGTM
This check can be enabled by using the flag --enum-range-check in goto-instrument. It inserts assertions before each use of any enum type expressions that the expression's value is one of the valid enum values. Note: It doesn't insert checks for occurrences of enum expressions on the left hand side of assignments.
a895b40
to
85b90f3
Compare
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.
This PR failed Diffblue compatibility checks (cbmc commit: 85b90f3).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/122303742
Status will be re-evaluated on next push.
Common spurious failures include: the cbmc commit has disappeared in the mean time (e.g. in a force-push); the author is not in the list of contributors (e.g. first-time contributors); compatibility was already broken by an earlier merge.
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.
Looks good, just needs a few extensions to make sure pragmas to disable the new check work fine.
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.
This PR failed Diffblue compatibility checks (cbmc commit: 933eb5e).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/122622217
Status will be re-evaluated on next push.
Common spurious failures include: the cbmc commit has disappeared in the mean time (e.g. in a force-push); the author is not in the list of contributors (e.g. first-time contributors); compatibility was already broken by an earlier merge.
Adds checks before every appearance of an enum type expression. These checks ensure that the value of the enum expression is one of the defined enum values. It doesn't insert checks for occurrences on the left hand side of assignments, as this introduces false positives (e.g when a variable is just declared but not initialized).