From efb88af6f7a20edc183e611f5f607e20a75fa2be Mon Sep 17 00:00:00 2001 From: Daejun Park Date: Wed, 6 Dec 2023 15:10:07 -0800 Subject: [PATCH] fix: revert code and storage --- src/halmos/sevm.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/halmos/sevm.py b/src/halmos/sevm.py index 7dfc75be..8c50b6b5 100644 --- a/src/halmos/sevm.py +++ b/src/halmos/sevm.py @@ -1711,8 +1711,8 @@ def callback(new_ex, stack, step_id): if not subcall_success: # revert network states - new_ex.code = orig_code - new_ex.storage = orig_storage + new_ex.code = orig_code.copy() + new_ex.storage = deepcopy(orig_storage) new_ex.balance = orig_balance # add to worklist even if it reverted during the external call @@ -2000,8 +2000,8 @@ def callback(new_ex, stack, step_id): new_ex.st.push(con(0)) # revert network states - new_ex.code = orig_code - new_ex.storage = orig_storage + new_ex.code = orig_code.copy() + new_ex.storage = deepcopy(orig_storage) new_ex.balance = orig_balance # add to worklist