Closed
Description
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:
- Write bytes 5-10 to the return slice.
- 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.