Try fixing the fp

concrete_ite_storage
Nikhil 5 years ago
parent b3792dafa8
commit 4796d8fabe
  1. 1
      mythril/analysis/modules/suicide.py
  2. 2
      mythril/laser/ethereum/state/account.py
  3. 12
      mythril/laser/smt/bitvecfunc.py

@ -101,6 +101,7 @@ class SuicideModule(DetectionModule):
transaction_sequence=transaction_sequence,
gas_used=(state.mstate.min_gas_used, state.mstate.max_gas_used),
)
print(state.mstate.constraints)
return [issue]
except UnsatError:
try:

@ -193,13 +193,13 @@ class Storage:
def __getitem__(self, key: BitVec) -> BitVec:
ite_get = self._ite_region[cast(BitVecFunc, key)]
array_get = self._array_region[key]
print(If(ite_get, ite_get, array_get))
return If(ite_get, ite_get, array_get)
def __setitem__(self, key: BitVec, value: Any) -> None:
self._printable_storage[key] = value
if self._array_condition(key):
self._array_region[key] = value
return
self._ite_region[cast(BitVecFunc, key)] = value

@ -67,12 +67,12 @@ def _comparison_helper(
if operation == z3.ULT:
operation = operator.lt
return Bool(z3.BoolVal(operation(a.value, b.value)), annotations=union)
if not isinstance(b, BitVecFunc) and a.potential_value:
condition = False
for value, cond in a.potential_value:
if value is not None:
condition = Or(condition, And(b == value, cond))
return And(condition, operation(a.raw, b.raw))
#if not isinstance(b, BitVecFunc) and a.potential_value:
# condition = False
# for value, cond in a.potential_value:
# if value is not None:
# condition = Or(condition, And(b == value, cond))
# return And(condition, operation(a.raw, b.raw))
if (
not isinstance(b, BitVecFunc)
or not a.func_name

Loading…
Cancel
Save