Skip to content
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 BitVecExtract simplification for constant folding #2524

Merged
merged 5 commits into from
Jan 20, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Test: pass BitVecExtract args with keywords
Boyan-MILANOV committed Jan 20, 2022
commit 90e3c2b64db772a8fe108f904fb5832469f00f01
2 changes: 1 addition & 1 deletion tests/other/test_smtlibv2.py
Original file line number Diff line number Diff line change
@@ -824,7 +824,7 @@ def test_arithmetic_simplify_extract(self):
def test_constant_folding_extract(self):
cs = ConstraintSet()
x = BitVecConstant(size=32, value=0xAB123456, taint=("important",))
z = constant_folder(BitVecExtract(x, 8, 16))
z = constant_folder(BitVecExtract(operand=x, offset=8, size=16))
self.assertItemsEqual(z.taint, ("important",))
self.assertEqual(z.value, 0x1234)