-
Notifications
You must be signed in to change notification settings - Fork 271
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
Extend expr_initializer to support byte-wise initialization #7392
Extend expr_initializer to support byte-wise initialization #7392
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #7392 +/- ##
===========================================
- Coverage 78.68% 78.64% -0.04%
===========================================
Files 1698 1698
Lines 194124 194608 +484
===========================================
+ Hits 152740 153052 +312
- Misses 41384 41556 +172
☔ View full report in Codecov by Sentry. |
Given I don't have enough context just yet the following may be a stupid idea, apologies for that: couldn't you instead use |
That may not be as stupid as it sounds. Let me try. If it works then the entire |
Please keep in mind that Goto programs are meant to be consumed by a broad variety of analysis methods. Virtually all but symex will choke on the above. |
I agree. We should create a goto that can be consumed by analysis methods other than symex. |
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 good although it needs unit tests + a few minor comments
fcefd28
to
ac52ff6
Compare
Rebased to the latest |
39fd090
to
c45da05
Compare
We can now pass in 0 and nondet, and can then extend it to take more general initialization expressions.
Each byte of the expression is initialized to the given initialization expression. This building block will be required for the shadow memory implementation.
c45da05
to
2e6a7c6
Compare
PR rebased, added tests and ready to review. |
2e6a7c6
to
c5ef83d
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.
LGTM
Function `duplicate_per_byte` now has a PRECONDITION checking that the `init_byte_expr` is either a boolean or a bitvector of maximum size 8. Also the computation of the number of duplication correctly accounts the case when the destination is not divisible by 8. In this case the input is duplicated one extra (including the sign bit if any) time and then truncated to the output size.
c5ef83d
to
e049de7
Compare
Each byte of the expression is initialized to the given initialization expression, if possible.
This building block will be required for the shadow memory implementation.