-
Notifications
You must be signed in to change notification settings - Fork 274
Byte-operator lowering: Add support for byte-extracting unions #4717
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
Conversation
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.
✔️
Passed Diffblue compatibility checks (cbmc commit: 9384d50).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/113362951
Also tests please, including one with multiple like-sized components (e.g. |
9384d50
to
7bae4d5
Compare
Test added, but note that this code will only be reached when none of the members as a known non-zero size. |
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.
Hmm, are you really sure we want to do lifting to the first component if it's the wrong size, rather than just abandoning conversion and doing whatever we did before this code existed?
No, I'm not sure :-) - but what we did before this code existed is running into a failing invariant that said that this case is unsupported. |
Perhaps it would be better to have an invariant that if we're trying to turn a |
7bae4d5
to
459ad22
Compare
Codecov ReportBase: 78.26% // Head: 78.26% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #4717 +/- ##
========================================
Coverage 78.26% 78.26%
========================================
Files 1642 1642
Lines 189830 189834 +4
========================================
+ Hits 148568 148575 +7
+ Misses 41262 41259 -3
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. |
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.
Approve but please do have a look at the comments.
da4866c
to
97fbe27
Compare
The test included made apparent that we weren't yet handling unbounded byte extracts (out of a bounded object) for unions, which just fell back to unpacking an empty array.
97fbe27
to
7032a1f
Compare
We already had support for structs, arrays, vectors in place; add unions
following the same approach. This is required for some SV-COMP device
driver benchmarks, including
ldv-linux-3.16-rc1/43_2a_consumption_linux-3.16-rc1.tar.xz-43_2a-drivers--scsi--qla2xxx--tcm_qla2xxx.ko-entry_point.cil.out.i