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

Testcase needed for CODECOPY where code_size=0 #493

Closed
masonforest opened this issue Aug 30, 2018 · 4 comments
Closed

Testcase needed for CODECOPY where code_size=0 #493

masonforest opened this issue Aug 30, 2018 · 4 comments

Comments

@masonforest
Copy link

masonforest commented Aug 30, 2018

We at Mana ran into a consensus breaking bug in our client at block #116524. The issue was that when code_size was set to 0 when running the opcode CODECOPY we would push a 0 onto the stack instead of leaving the state unchanged. This was a bug in our implementation and was fixed in commit mana-ethereum/mana@8279808. It may be helpful to add a test for this case for this so other new clients don’t run into the same issue in the future.

@holiman
Copy link
Contributor

holiman commented Aug 30, 2018

Looking at the fix, you mean CODECOPY, not CALLCODE, right?

@masonforest masonforest changed the title Testcase needed for callcodewhere code_size=0 Testcase needed for CODECOPY where code_size=0 Aug 30, 2018
@masonforest
Copy link
Author

Whoops, yep. Updated 👍

@axic
Copy link
Member

axic commented Aug 31, 2018

Can the new test case also cover EXTCODECOPY please?

@winsvega
Copy link
Collaborator

#569

could not really test codecopy of empty code. I've put codecopy into contract init code maybe this count.

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

4 participants