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

RETURNDATACOPY may check twice for EVM_INVALID_MEMORY_ACCESS #173

Closed
ehildenb opened this issue Mar 26, 2018 · 3 comments
Closed

RETURNDATACOPY may check twice for EVM_INVALID_MEMORY_ACCESS #173

ehildenb opened this issue Mar 26, 2018 · 3 comments

Comments

@ehildenb
Copy link
Member

ehildenb commented Mar 26, 2018

Right now there is an extra rule for RETURNDATACOPY which checks for invalid memory access, but this should already be caught by the #memory function.

We should remove the redundant check.

@dwightguth
Copy link
Collaborator

I have absolutely no idea what you're talking about. This rule isn't redundant at all and has nothing to do with the gas usage captured by #memory. It is directly part of ethereum/EIPs#211. Unlike all other COPY instructions, RETURNDATACOPY throws an exception if you try to access an offset in the return data buffer that doesn't exist.

If you remove this rule and side condition, tests are definitely going to fail.

Can we close this?

@ehildenb
Copy link
Member Author

Please tone down your language. I noticed what looked like a redundant rule in the semantics and opened an issue for it, it's not a cause to get mad.

I'm leaving open until I've convinced myself that this is a non-issue. I open the issue so I can keep track of things I'm not prioritizing right now but want to get to eventually.

@ehildenb
Copy link
Member Author

Indeed, the checks are for different cases. Thanks @dwightguth for explaining the difference.

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

2 participants