From 3774c4f8eaf6103a4d33dc8b4360f3352a3ac739 Mon Sep 17 00:00:00 2001 From: Nathan Date: Fri, 30 Nov 2018 06:08:08 -0500 Subject: [PATCH] create function for returndatacopy and pop arguments (#774) --- mythril/laser/ethereum/instructions.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mythril/laser/ethereum/instructions.py b/mythril/laser/ethereum/instructions.py index 06b907ef..64e27dcd 100644 --- a/mythril/laser/ethereum/instructions.py +++ b/mythril/laser/ethereum/instructions.py @@ -131,7 +131,7 @@ class Instruction: def evaluate(self, global_state: GlobalState, post=False) -> List[GlobalState]: """ Performs the mutation for this instruction """ # Generalize some ops - # logging.debug("Evaluating {}".format(self.op_code)) + logging.debug("Evaluating {}".format(self.op_code)) op = self.op_code.lower() if self.op_code.startswith("PUSH"): op = "push" @@ -773,6 +773,14 @@ class Instruction: return [global_state] + @StateTransition() + def returndatacopy_(self, global_state: GlobalState) -> List[GlobalState]: + # FIXME: not implemented + state = global_state.mstate + start, s2, size = state.stack.pop(), state.stack.pop(), state.stack.pop() + + return [global_state] + @StateTransition() def returndatasize_(self, global_state: GlobalState) -> List[GlobalState]: global_state.mstate.stack.append(global_state.new_bitvec("returndatasize", 256))