From 5fe1b5149dc95a421c08a6ff1fe9747e0cbe0f22 Mon Sep 17 00:00:00 2001 From: Joe Date: Tue, 8 May 2018 00:24:29 -0400 Subject: [PATCH] adding exception in _can_change() --- .../analysis/modules/transaction_order_independence.py | 8 +++++--- setup.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mythril/analysis/modules/transaction_order_independence.py b/mythril/analysis/modules/transaction_order_independence.py index 783bd6fb..a2e34554 100644 --- a/mythril/analysis/modules/transaction_order_independence.py +++ b/mythril/analysis/modules/transaction_order_independence.py @@ -79,9 +79,11 @@ def _can_change(constraints, variable): model = solver.get_model(_constraints) except UnsatError: return False - initial_value = int(str(model.eval(variable, model_completion=True))) - return _try_constraints(constraints, [variable != initial_value]) is not None - + try: + initial_value = int(str(model.eval(variable, model_completion=True))) + return _try_constraints(constraints, [variable != initial_value]) is not None + except AttributeError: + return False def _get_influencing_storages(call): """ Examines a Call object and returns an iterator of all storages that influence the call value or direction""" diff --git a/setup.py b/setup.py index 8fa2b494..5661442d 100755 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ import os # Package version (vX.Y.Z). It must match git tag being used for CircleCI # deployment; otherwise the build will failed. -VERSION = "v0.16.31" +VERSION = "v0.16.32" class VerifyVersionCommand(install): """Custom command to verify that the git tag matches our version"""