Skip to content

Commit

Permalink
StridedInterval: Return top for unexpected shift amounts. (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
ltfish authored Nov 30, 2023
1 parent cbf11e0 commit a994d1e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions claripy/vsa/strided_interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -2291,6 +2291,9 @@ def rshift_logical(self, shift_amount):

ret = si_ if ret is None else ret.union(si_)

if ret is None:
return StridedInterval.top(self.bits)

ret.normalize()
ret.uninitialized = self.uninitialized
return ret
Expand All @@ -2315,6 +2318,9 @@ def _unrev_rshift_logical(self, shift_amount):

ret = si_ if ret is None else ret.union(si_)

if ret is None:
return StridedInterval.top(self.bits)

ret.normalize()
ret.uninitialized = self.uninitialized
return ret
Expand All @@ -2340,6 +2346,9 @@ def rshift_arithmetic(self, shift_amount):

ret = si_ if ret is None else ret.union(si_)

if ret is None:
return StridedInterval.top(self.bits)

ret.normalize()
ret.uninitialized = self.uninitialized
return ret
Expand Down

0 comments on commit a994d1e

Please sign in to comment.