-
Notifications
You must be signed in to change notification settings - Fork 273
Initialization of a flexible array member leads to cbmc crash or verification failure. #4206
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
Comments
Just adding that with |
Is there a work around for this? I hit something that looks like the latter failure ( |
@Smattr Did you discover a workaround? |
No, I don't think so. IIRC at the time I was trying to do something involving a suite of verification tools, so I simply lent more heavily on one of the others to get the job done instead of CBMC. |
Work arounds at the bottom of this comment: |
We probably have more than one bug around flexible array members. Likely we should consider introducing a dedicated type (or at least some annotation to the containing struct) to handle these. |
I think the crash with SMT backend might be fixed by #5904 (the PR is waiting for Z3 integration in CI). |
Can confirm there is no crash with |
This addresses an existing todo in the code base: we need to come up with a new type based on the actual initializer. Fixes: diffblue#3653, diffblue#4206 Co-authored-by: Chengyu Zhang <[email protected]> Co-authored-by: Andreas Tiemeyer <[email protected]>
This addresses an existing todo in the code base: we need to come up with a new type based on the actual initializer. Fixes: diffblue#3653, diffblue#4206 Co-authored-by: Chengyu Zhang <[email protected]> Co-authored-by: Andreas Tiemeyer <[email protected]>
This addresses an existing todo in the code base: we need to come up with a new type based on the actual initializer. Fixes: diffblue#3653, diffblue#4206 Co-authored-by: Chengyu Zhang <[email protected]> Co-authored-by: Andreas Tiemeyer <[email protected]>
Was fixed in #6661. |
CBMC version: cbmc-5.11, cbmc-5.11-1479-ga86978840
Operating system: Linux 4.15.0-45-generic x86_64 GNU/Linux
Exact command line resulting in the issue: cbmc ccb.c , cbmc ccb.c --smt2
What behaviour did you expect: all 4 assertions should pass
What happened instead: 2 assertions fail (SAT backend), CBMC crash (smt2 backend)
In the following code all assertions should be true:
With cbmc, the behavior depends on the solver backend. With the default SAT solver backend, assertions 3 and 4 are failing for both cbmc-5.11 and cbmc-5.11-1479-ga86978840:
With the smt2 backend, cbmc crashes. With cbmc-5.11 the error message is:
With cbmc-5.11-1479-ga86978840 from the develop branch (rev a869788), the error message is:
The text was updated successfully, but these errors were encountered: