Skip to content

test_no_memory_corruption_on_upper_create_stack_levels()

Documentation for tests/cancun/eip5656_mcopy/test_mcopy_contexts.py::test_no_memory_corruption_on_upper_create_stack_levels@verkle@v0.0.6.

Generate fixtures for these test cases for Cancun with:

Cancun only:

fill -v tests/cancun/eip5656_mcopy/test_mcopy_contexts.py::test_no_memory_corruption_on_upper_create_stack_levels --fork=Cancun --evm-bin=/path/to/evm-tool-dev-version

For all forks up to and including Cancun:

fill -v tests/cancun/eip5656_mcopy/test_mcopy_contexts.py::test_no_memory_corruption_on_upper_create_stack_levels --until=Cancun

Perform a subcall with any of the following opcodes, which uses MCOPY during its execution, and verify that the caller's memory is unaffected: - CREATE - CREATE2

TODO: [EOF] Add EOFCREATE opcode

Source code in tests/cancun/eip5656_mcopy/test_mcopy_contexts.py
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
@pytest.mark.parametrize(
    "call_opcode",
    [
        Op.CREATE,
        Op.CREATE2,
    ],
)
@pytest.mark.valid_from("Cancun")
def test_no_memory_corruption_on_upper_create_stack_levels(
    state_test: StateTestFiller,
    pre: Alloc,
    post: Mapping[str, Account],
    tx: Transaction,
):
    """
    Perform a subcall with any of the following opcodes, which uses MCOPY during its execution,
    and verify that the caller's memory is unaffected:
      - `CREATE`
      - `CREATE2`

    TODO: [EOF] Add EOFCREATE opcode
    """
    state_test(
        env=Environment(),
        pre=pre,
        post=post,
        tx=tx,
    )

Parametrized Test Cases

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

Skipped Parameters

For more concise readability, the table below does not list the following parameter values: fork, blockchain_test, state_test, state_test_only, eof_test, eof_state_test.

Test ID call_opcode
call_opcode_CREATE CREATE
call_opcode_CREATE2 CREATE2
call_opcode_CREATE CREATE
call_opcode_CREATE2 CREATE2