Skip to content

Commit

Permalink
fix(fw): EOF: exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
marioevz committed May 27, 2024
1 parent 57617bd commit 4df25f3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ethereum_test_tools/exceptions/evmone_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ class EvmoneExceptionMapper:
ExceptionMessage(EOFException.INCOMPLETE_SECTION_NUMBER, "err: incomplete_section_number"),
ExceptionMessage(EOFException.TOO_MANY_CODE_SECTIONS, "err: too_many_code_sections"),
ExceptionMessage(EOFException.ZERO_SECTION_SIZE, "err: zero_section_size"),
ExceptionMessage(EOFException.MISSING_DATA_SECTION, "err: data_section_missing"),
ExceptionMessage(EOFException.UNDEFINED_INSTRUCTION, "err: undefined_instruction"),
ExceptionMessage(
EOFException.INPUTS_OUTPUTS_NUM_ABOVE_LIMIT, "err: inputs_outputs_num_above_limit"
),
ExceptionMessage(EOFException.UNREACHABLE_INSTRUCTIONS, "err: unreachable_instructions"),
ExceptionMessage(EOFException.INVALID_RJUMP_DESTINATION, "err: invalid_rjump_destination"),
ExceptionMessage(EOFException.UNREACHABLE_CODE_SECTIONS, "err: unreachable_code_sections"),
Expand Down
8 changes: 8 additions & 0 deletions src/ethereum_test_tools/exceptions/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ class EOFException(ExceptionBase):
"""
EOF container data header construction is wrong
"""
MISSING_DATA_SECTION = auto()
"""
EOF container missing data section
"""
INCOMPLETE_CONTAINER = auto()
"""
EOF container bytes are incomplete
Expand Down Expand Up @@ -299,6 +303,10 @@ class EOFException(ExceptionBase):
"""
EOF container's code missing STOP bytecode at it's end
"""
INPUTS_OUTPUTS_NUM_ABOVE_LIMIT = auto()
"""
EOF container code section inputs/outputs number is above the limit
"""
UNREACHABLE_INSTRUCTIONS = auto()
"""
EOF container's code have instructions that are unreachable
Expand Down

0 comments on commit 4df25f3

Please sign in to comment.