Skip to content

test_rjump_into_stack_underflow()

Documentation for tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py::test_rjump_into_stack_underflow@verkle@v0.0.6.

Generate fixtures for these test cases for Pragueeip7692 with:

Pragueeip7692 only:

fill -v tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py::test_rjump_into_stack_underflow --fork=PragueEIP7692 --evm-bin=/path/to/evm-tool-dev-version

For all forks up to and including Pragueeip7692:

fill -v tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py::test_rjump_into_stack_underflow --until=PragueEIP7692

EOF code containing RJUMP with target instruction that cause stack underflow

Source code in tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
def test_rjump_into_stack_underflow(
    eof_test: EOFTestFiller,
):
    """EOF code containing RJUMP with target instruction that cause stack underflow"""
    eof_test(
        data=Container(
            sections=[
                Section.Code(
                    code=Op.ORIGIN
                    + Op.RJUMPI[len(Op.RJUMP[0])]
                    + Op.RJUMP[len(Op.STOP)]
                    + Op.STOP
                    + Op.POP
                    + Op.STOP
                ),
            ],
        ),
        expect_exception=EOFException.STACK_UNDERFLOW,
    )