Skip to content

test_rjump_backwards_infinite_loop()

Documentation for tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py::test_rjump_backwards_infinite_loop@83970623.

Generate fixtures for these test cases for Osaka with:

fill -v tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py::test_rjump_backwards_infinite_loop --fork Osaka

Validate that a backwards RJUMP as terminal operation is valid.

Source code in tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
def test_rjump_backwards_infinite_loop(
    eof_test: EOFTestFiller,
):
    """Validate that a backwards RJUMP as terminal operation is valid."""
    eof_test(
        container=Container(
            name="backwards_rjump_terminal",
            sections=[
                Section.Code(
                    code=Op.PUSH0
                    + Op.RJUMPI[3]
                    + Op.RJUMP[7]
                    + Op.SSTORE(1, 0x2015)
                    + Op.STOP
                    + Op.RJUMP[-10]
                ),
                Section.Data(data="0xdeadbeef"),
            ],
        ),
    )

Parametrized Test Cases

This test case is only parametrized by fork.

Test ID (Abbreviated)
...fork_Osaka-eof_test