Skip to content

Commit

Permalink
Fallback for zerodivision
Browse files Browse the repository at this point in the history
  • Loading branch information
Airtnp committed Nov 30, 2018
1 parent a997996 commit 2461603
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion angr/engines/vex/irop.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,8 @@ def calculate(self, *args):
try:
return self.extend_size(self._calculate(args))
except (ZeroDivisionError, claripy.ClaripyZeroDivisionError) as e:
raise SimZeroDivisionException("divide by zero!") from e
return self.extend_size(claripy.BVS('ZeroDivision', self._output_size_bits))
# raise SimZeroDivisionException("divide by zero!") from e
except (TypeError, ValueError, SimValueError, claripy.ClaripyError) as e:
raise SimOperationError("%s._calculate() raised exception" % self.name) from e

Expand Down

0 comments on commit 2461603

Please sign in to comment.