Remove VmException from state

pull/494/head
Nikhil Parasaram 6 years ago
parent 404b8d9aee
commit afceb2a80c
  1. 1
      mythril/laser/ethereum/instructions.py
  2. 6
      mythril/laser/ethereum/state.py

@ -503,7 +503,6 @@ class Instruction:
data = b''.join([util.get_concrete_int(i).to_bytes(1, byteorder='big')
for i in state.memory[index: index + length]])
# FIXME: broad exception catch
except AttributeError:
svar = str(state.memory[index])

@ -2,7 +2,6 @@ from z3 import BitVec, BitVecVal
from copy import copy, deepcopy
from enum import Enum
from random import randint
from mythril.laser.ethereum.exceptions import VmException
class CalldataType(Enum):
@ -145,10 +144,7 @@ class MachineState:
if self.memory_size > start + size:
return
m_extend = (start + size - self.memory_size)
try:
self.memory.extend(bytearray(m_extend))
except MemoryError:
raise VmException('error extending memory')
self.memory.extend(bytearray(m_extend))
return True
def memory_write(self, offset, data):

Loading…
Cancel
Save