-
Notifications
You must be signed in to change notification settings - Fork 274
CBMC 5.12 crashes on converting structs to SMT2 #5297
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
I'm seeing this issue, too. Is this a new issue (i.e., has CBMC worked in previous versions?) or has it always existed? This is a real bummer for me because I want to use the SMT backend rather than the SAT backend. Have you found a workaround? |
@amosr and @jackhumphries : sorry that no-one responded to this sooner. I have managed to replicate this issue with the latest |
Z3 uses the |
As a work-around setting |
I think I have tracked down what is going on. The following backtrace is useful:
but note some of the line numbers are wrong, caused, I think by polymorphic dispatch on The exception is thrown from: cbmc/src/solvers/smt2/smt2_conv.cpp Line 4531 in a46f12d
(and handled badly by the top level catch but that is a different issue) because there is not an appropriate entry in datatype_map for something of type ID_struct_tag .
How does this happen? If cbmc/src/solvers/smt2/smt2_conv.cpp Line 4271 in a46f12d
ID_symbol with type ID_struct_tag then the recursion into find_symbols(const typet &type) cbmc/src/solvers/smt2/smt2_conv.cpp Line 4274 in a46f12d
datatype_map but doesn't. So when you get to cbmc/src/solvers/smt2/smt2_conv.cpp Line 4321 in a46f12d
Why doesn't it populate it correctly? cbmc/src/solvers/smt2/smt2_conv.cpp Line 4823 in a46f12d
This was broken by a change in how Work-arounds:
Thought on patches most welcome. |
Confirmed, thus closing the issue. |
CBMC version: 5.12 (pilot_release_3_1_6-352-g0e8fb44063-dirty) and current head (cbmc-5.12-161-g48b8c90dd), though 5.11 works
Operating system: OSX and Ubuntu Linux
Exact command line resulting in the issue:
cbmc smt_failure.c --smt2
What behaviour did you expect: verification should fail
What happened instead: CBMC crashes with the error
map::at: key not found
:Test case
smt_failure.c
:Hi,
Sorry if this is a known issue – on the surface it looks similar to #4206, but I think it's different because this test case doesn't include flexible structs and only fails on the most recent version.
The text was updated successfully, but these errors were encountered: