Merge branch 'develop' into feature/import-custom-modules

feature/import-custom-modules
Nathan 5 years ago committed by GitHub
commit 2a67135380
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      mythril/laser/ethereum/evm_exceptions.py
  2. 5
      mythril/laser/ethereum/state/global_state.py
  3. 1
      requirements.txt
  4. 1
      setup.py

@ -35,3 +35,9 @@ class OutOfGasException(VmException):
"""A VM exception denoting the current execution has run out of gas."""
pass
class ProgramCounterException(VmException):
"""A VM exception denoting an invalid PC value (No stop instruction is reached)."""
pass

@ -9,6 +9,7 @@ from mythril.laser.ethereum.cfg import Node
from mythril.laser.ethereum.state.environment import Environment
from mythril.laser.ethereum.state.machine_state import MachineState
from mythril.laser.ethereum.state.annotation import StateAnnotation
from mythril.laser.ethereum.evm_exceptions import ProgramCounterException
if TYPE_CHECKING:
from mythril.laser.ethereum.state.world_state import WorldState
@ -88,6 +89,10 @@ class GlobalState:
"""
instructions = self.environment.code.instruction_list
if self.mstate.pc >= len(instructions):
raise ProgramCounterException(
"PC: {} can not be reached.".format(self.mstate.pc)
)
return instructions[self.mstate.pc]
@property

@ -12,7 +12,6 @@ eth-keys>=0.2.0b3,<0.3.0
eth-rlp>=0.1.0
eth-tester==0.1.0b32
eth-typing>=2.0.0
eth-utils>=1.0.1
jinja2>=2.9
mock
persistent>=4.2.0

@ -32,7 +32,6 @@ REQUIRED = [
"py-solc",
"plyvel",
"eth_abi==1.3.0",
"eth-utils>=1.0.1",
"eth-account>=0.1.0a2,<=0.3.0",
"eth-hash>=0.1.0",
"eth-keyfile>=0.5.1",

Loading…
Cancel
Save