Skip to content

EVM: Fix data copying logic #1021

Closed
Closed
@Stebalien

Description

@Stebalien

The EVM generally treats memory as "infinite", limited only by gas.

E.g., if a user asks for bytes 5-15 out of a 10 byte return value, the EVM will:

  1. Write bytes 5-10 to the return slice.
  2. Zero the rest of the return slice.

If a user asks for, say, bytes starting at 2^200, the EVM will not fail. It'll just return a bunch of zeros.

We need to fix:

  • CALL (and friends)
  • EXTCODECOPY

And probably quite a few other opcodes to follow this behavior.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions