Skip to content

test_rjumpi_into_self_data_portion()

Documentation for tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py::test_rjumpi_into_self_data_portion@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_self_data_portion --fork Osaka

EOF1I4200_0021 (Invalid) EOF code containing RJUMPI with target same RJUMPI immediate (with offset).

Source code in tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
@pytest.mark.parametrize("offset", range(1, Op.RJUMP.data_portion_length + 1))
def test_rjumpi_into_self_data_portion(
    eof_test: EOFTestFiller,
    offset: int,
):
    """
    EOF1I4200_0021 (Invalid) EOF code containing RJUMPI with target same RJUMPI immediate
    (with offset).
    """
    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_1 1
...fork_Osaka-eof_test-offset_2 2