CBMC silently omits invalid struct field in GotoC output #6984
Labels
aws
Bugs or features of importance to AWS CBMC users
Kani
Bugs or features of importance to Kani Rust Verifier
pending merge
I discovered this bug working on Kani, in particular the bug model-checking/kani#1243 with @danielsn. Kani there tries to create a struct with a field of type
code
, which is not allowed in C because a function cannot be stored directly in a struct but has to be behind a pointer. The symbol table correctly records this invalid field type, but the GotoC output (produced withgoto-instrument --dump-c
) silently omits this invalid field, which confused us for a while when debugging the Kani issue.CBMC version: 5.60.0
Operating system: macOS 12.3.1
Exact command line resulting in the issue:
kani --enable-unstable --gen-c --keep-temps test.rs
(I cannot provide a direct example using C code because the issue is about invalid C code only encountered in Kani.)What behaviour did you expect: CBMC outputs a warning about an invalid struct field or generates some output in test.out.c about the field.
What happened instead: The invalid field is silently omitted in the output.
The text was updated successfully, but these errors were encountered: