Merge pull request #656 from ConsenSys/hotfix/revertoverflow

revert changes to support z3 4.5
pull/657/head
JoranHonig 6 years ago committed by GitHub
commit 58c019ace4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      mythril/analysis/modules/integer.py

@ -72,11 +72,12 @@ def _check_integer_overflow(statespace, state, node):
# Formulate expression
if instruction["opcode"] == "ADD":
expr = op0 + op1
constraint = Not(BVAddNoOverflow(op0, op1, signed=False))
# constraint = Not(BVAddNoOverflow(op0, op1, signed=False))
else:
expr = op1 * op0
constraint = Not(BVMulNoOverflow(op0, op1, signed=False))
# constraint = Not(BVMulNoOverflow(op0, op1, signed=False))
constraint = Or(And(ULT(expr, op0), op1 != 0), And(ULT(expr, op1), op0 != 0))
# Check satisfiable
model = _try_constraints(node.constraints, [constraint])

Loading…
Cancel
Save