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

core/vm: implement RETURNDATA metropolis opcodes #14981

Merged
merged 3 commits into from
Aug 16, 2017

Conversation

karalabe
Copy link
Member

@karalabe karalabe commented Aug 16, 2017

Implements ethereum/EIPs#211.

@karalabe karalabe added this to the 1.7.0 milestone Aug 16, 2017
@karalabe karalabe requested a review from holiman August 16, 2017 10:43
@karalabe karalabe mentioned this pull request Aug 16, 2017
8 tasks
@@ -113,6 +114,10 @@ func (in *Interpreter) Run(snapshot int, contract *Contract, input []byte) (ret
in.evm.depth++
defer func() { in.evm.depth-- }()

// Reset the previous call's return data. It's unimportant to preserve the old buffer
// as every returning call will return new data anyway.
in.returnData = nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nitpick, it's not only "unimportant to preserve the old buffer", it's required to clear the buffer here - otherwise a child-call could access the returndata from a parent context.

@karalabe
Copy link
Member Author

karalabe commented Aug 16, 2017 via email

@holiman
Copy link
Contributor

holiman commented Aug 16, 2017

Ah, yeah that makes more sense, thanks

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

Successfully merging this pull request may close these issues.

3 participants