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
Next Next commit
Fix BitVecExtract simplification for constant folding
Boyan-MILANOV committed Jan 20, 2022

Verified

This commit was signed with the committer’s verified signature. The key has expired.
tvdeyen Thomas von Deyen
commit e7f3511d99ace81ffd5654937aeb3e4ae94164af
2 changes: 1 addition & 1 deletion manticore/core/smtlib/visitors.py
Original file line number Diff line number Diff line change
@@ -384,7 +384,7 @@ def visit_BitVecExtract(self, expression, *operands):
begining = expression.begining
end = expression.end
value = value >> begining
mask = (1 << (end - begining)) - 1
mask = (1 << (end - begining+1)) - 1
value = value & mask
return BitVecConstant(size=expression.size, value=value, taint=expression.taint)