Skip to content

test_rjumpi_into_header()

Documentation for tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py::test_rjumpi_into_header@21fb11c8.

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
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
@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