|
|
@ -131,7 +131,7 @@ class Instruction: |
|
|
|
def evaluate(self, global_state: GlobalState, post=False) -> List[GlobalState]: |
|
|
|
def evaluate(self, global_state: GlobalState, post=False) -> List[GlobalState]: |
|
|
|
""" Performs the mutation for this instruction """ |
|
|
|
""" Performs the mutation for this instruction """ |
|
|
|
# Generalize some ops |
|
|
|
# Generalize some ops |
|
|
|
# logging.debug("Evaluating {}".format(self.op_code)) |
|
|
|
logging.debug("Evaluating {}".format(self.op_code)) |
|
|
|
op = self.op_code.lower() |
|
|
|
op = self.op_code.lower() |
|
|
|
if self.op_code.startswith("PUSH"): |
|
|
|
if self.op_code.startswith("PUSH"): |
|
|
|
op = "push" |
|
|
|
op = "push" |
|
|
@ -773,6 +773,14 @@ class Instruction: |
|
|
|
|
|
|
|
|
|
|
|
return [global_state] |
|
|
|
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() |
|
|
|
@StateTransition() |
|
|
|
def returndatasize_(self, global_state: GlobalState) -> List[GlobalState]: |
|
|
|
def returndatasize_(self, global_state: GlobalState) -> List[GlobalState]: |
|
|
|
global_state.mstate.stack.append(global_state.new_bitvec("returndatasize", 256)) |
|
|
|
global_state.mstate.stack.append(global_state.new_bitvec("returndatasize", 256)) |
|
|
|