Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YP semantics for RETURNDATACOPY are incorrect #758

Open
Arachnid opened this issue Jul 14, 2019 · 2 comments
Open

YP semantics for RETURNDATACOPY are incorrect #758

Arachnid opened this issue Jul 14, 2019 · 2 comments

Comments

@Arachnid
Copy link

The YP says that RETURNDATACOPY is zero padded, but EIP 211 specifies it's an error to request data past the end of the buffer. geth's implementation concurs.

@recmo
Copy link

recmo commented Jul 14, 2019

It is actually covered in section 9.4.2."Exceptional Halting". This is consistent with the specification for invalid JUMPs and other potentially reverting instructions, none of which have a mention of this in the instructions table.

That being said, the zero-padding in the expression is misleading. These values can never be created without reverting. Perhaps we can replace the value zero in the out of bounds case with "exceptional halt otherwise" ?

parity's implementation

@recmo
Copy link

recmo commented Jul 14, 2019

Twitter discussion leading up to this report: https://twitter.com/recmo/status/1150326278022729729

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@Arachnid @recmo and others