-
Notifications
You must be signed in to change notification settings - Fork 274
Fix linking in case of function type conflict #6547
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
Fix linking in case of function type conflict #6547
Conversation
c0aa8f5
to
068a9d8
Compare
Codecov ReportBase: 77.92% // Head: 77.96% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #6547 +/- ##
===========================================
+ Coverage 77.92% 77.96% +0.03%
===========================================
Files 1616 1616
Lines 186814 186855 +41
===========================================
+ Hits 145580 145675 +95
+ Misses 41234 41180 -54
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
068a9d8
to
3b73b4d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sensible, and thanks for the extra tests!
c0a3df4
to
3a2bbfc
Compare
7cc5253
to
0e8fb79
Compare
0e8fb79
to
1e1426f
Compare
9f54262
to
92fc2e3
Compare
92fc2e3
to
d56bedf
Compare
We previously just reported pointer type conflicts without elaborating what the exact difference was. To produce type-consistent goto programs, we chose to use the type that the definition had, but lacked any test that doing so would actually result in a program that can be analysed successfully. This commit fixes bugs in the code producing diagnostics, enables diagnostics for the case of pointer type conflicts, and adds a test to demonstrate that we successfully analyse programs after type conflict resolution. Despite this, however, inconsistencies in the goto program remain: the call types still need fixing up. Fixes: diffblue#198
The linker already accepted a number of type mismatches for function declarations, but did not actually modify the goto functions to reflect these type mismatches, just the type information in the symbol table was updated. These changes enable support for conflicts on function return types, which are now resolved by introducing type casts.
d56bedf
to
39e7078
Compare
We already almost did the right thing, but were failing to update types at call sites. This PR also adds improved conflict reporting and an actual test of such type conflicts.