-
Notifications
You must be signed in to change notification settings - Fork 273
builtin type vs user type conflict #3081
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
This appears to be covered by regression/cbmc/Linking7. My view is that we can't really stop people from linking together files with functions that have somewhat inconsistent signatures. This should be detected during symbolic simulation, and an appropriate type cast should be added. |
In this case it's not just renaming of struct members; various additional members have been inserted into the struct... |
I guess the difference from |
The user has already got that choice by using |
I'm biased, but #2016 is my preference. |
Yes, it does. |
I've tried checking out #2016 and it also fixes the issue. |
I think we need both -- there will be people who simply have type-inconsistent definitions and declarations of functions, not involving libraries, which requires #3089. |
#6547 will be another piece to the puzzle as it will make sure function type conflicts can be resolved at all. |
CBMC version: cbmc-5.10-836-g273f375aa-dirty
Operating system: Ubuntu 18.04
Exact command line resulting in the issue: cbmc --unwinding-assertions --unwind 2 test.c
What behaviour did you expect: not to see invariant violation
What happened instead: invariants were violated
Problem analysis
fopen
andFILE
.return_value_fopen
andfopen#return_value
to bit-vectorsFILE
but the rhs has the builtin-defined typeFILE
struct
s) differ in the names of their components (not types)Proposed solutions
base_type_eq
check to ignorestruct
component's namesThe text was updated successfully, but these errors were encountered: