-
Notifications
You must be signed in to change notification settings - Fork 274
__CPROVER_enum_is_in_range() fails on enum value returning functions. #6586
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
Labels
Comments
Thank you for your report! It seems that we wrongly insert this check multiple times, where one of these insertions is before even making an assignment to the value. (Note how lines 12 and 13 appear multiple times in the output.) |
tautschnig
added a commit
to tautschnig/cbmc
that referenced
this issue
Jan 19, 2022
We already disabled these checks for assignment left-hand sides, but need to do the same for function calls. Else we'd be asserting validity before the value has been assigned. Fixes: diffblue#6586 Co-authored-by: Ilia Levin <[email protected]>
3 tasks
Thank you again for your detailed report. This will be fixed once #6594 has been merged. |
tautschnig
added a commit
to tautschnig/cbmc
that referenced
this issue
Jan 19, 2022
We already disabled these checks for assignment left-hand sides, but need to do the same for function calls. Else we'd be asserting validity before the value has been assigned. Fixes: diffblue#6586, diffblue#6451 Co-authored-by: Ilia Levin <[email protected]>
Great! Thank you for the fix. |
tautschnig
added a commit
to tautschnig/cbmc
that referenced
this issue
Jan 27, 2022
We already disabled these checks for assignment left-hand sides, but need to do the same for function calls. Else we'd be asserting validity before the value has been assigned. Fixes: diffblue#6586, diffblue#6451 Co-authored-by: Ilia Levin <[email protected]>
tautschnig
added a commit
to tautschnig/cbmc
that referenced
this issue
Jan 28, 2022
We already disabled these checks for assignment left-hand sides, but need to do the same for function calls. Else we'd be asserting validity before the value has been assigned. Fixes: diffblue#6586, diffblue#6451 Co-authored-by: Ilia Levin <[email protected]>
tautschnig
added a commit
to tautschnig/cbmc
that referenced
this issue
Feb 1, 2022
We already disabled these checks for assignment left-hand sides, but need to do the same for function calls. Else we'd be asserting validity before the value has been assigned. Fixes: diffblue#6586, diffblue#6451 Co-authored-by: Ilia Levin <[email protected]>
tautschnig
added a commit
to tautschnig/cbmc
that referenced
this issue
Feb 1, 2022
We already disabled these checks for assignment left-hand sides, but need to do the same for function calls. Else we'd be asserting validity before the value has been assigned. Fixes: diffblue#6586, diffblue#6451 Co-authored-by: Ilia Levin <[email protected]>
tautschnig
added a commit
to tautschnig/cbmc
that referenced
this issue
Feb 6, 2022
We already disabled these checks for assignment left-hand sides, but need to do the same for function calls. Else we'd be asserting validity before the value has been assigned. Fixes: diffblue#6586, diffblue#6451 Co-authored-by: Ilia Levin <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
CBMC version: 5.48.0 (cbmc-5.48.0)
Operating system: macOS 12.1 (21C52)
Exact command line resulting in the issue: cbmc --enum-range-check x.c
What behaviour did you expect: VERIFICATION SUCCESSFUL
What happened instead: VERIFICATION FAILED
This is the test code
The verification result when verified with
cbmc --enum-range-check x.c
The verification reports failure in line 12
enum enm e = efunc();
.Replacing function call with e.g.
enum enm e = second;
will give successful verification, as expected.The text was updated successfully, but these errors were encountered: