Skip to content
This repository was archived by the owner on Oct 29, 2021. It is now read-only.
This repository was archived by the owner on Oct 29, 2021. It is now read-only.

EVM array overflow with memory set operations #88

Description

@ferranbt

There is a case for an overflow in the EVM with Opcodes that resize the memory like here. The memory set operation does not check if the resize length of the memory overflows the max size of an array in Go. This would fail in the gas cost, however, the gas cost is computed later so the error is not catched.

It will require a change in the flow of all the memory operations:

  • Resize the memory to the correct size (or at least compute the cost)
  • Calculate gas cost
  • Set the value and resize if necessary

This issue is not covered in the ethereum/tests repo.
There are 3 txns around block 300K that produce this error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions