Skip to content

test_rjumpi_into_header()

Documentation for tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py::test_rjumpi_into_header@3719e927.

Generate fixtures for these test cases for Osaka with:

fill -v tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py::test_rjumpi_into_header --fork Osaka

EOF1I4200_0016 (Invalid) EOF code containing RJUMPI with target outside code bounds (Jumping into header).

Source code in tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
@pytest.mark.parametrize("offset", [-7, -15])
def test_rjumpi_into_header(
    eof_test: EOFTestFiller,
    offset: int,
):
    """
    EOF1I4200_0016 (Invalid) EOF code containing RJUMPI with target outside code bounds
    (Jumping into header).
    """
    eof_test(
        container=Container(
            sections=[
                Section.Code(
                    code=Op.PUSH1(1) + Op.RJUMPI[offset] + Op.STOP,
                )
            ],
        ),
        expect_exception=EOFException.INVALID_RJUMP_DESTINATION,
    )

Parametrized Test Cases

The interactive table below is also available as a standalone page.

Test ID (Abbreviated) offset
...fork_Osaka-eof_test-offset_-7 -7
...fork_Osaka-eof_test-offset_-15 -15
...fork_Osaka-state_test_from_eof_test-offset_-7 -7
...fork_Osaka-state_test_from_eof_test-offset_-15 -15
...fork_Osaka-blockchain_test_from_eof_test-offset_-7 -7
...fork_Osaka-blockchain_test_from_eof_test-offset_-15 -15