Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

x/evm/types: properly split in 32 chunks trace.Memory #838

Merged
merged 1 commit into from Dec 15, 2021

Conversation

odeke-em
Copy link
Contributor

This change fixes an insidious bug that unfortunately
tried to split values in multiples of 32, but unfortunately
due to the loop conditions, if the length of trace.Memory
was less than 32, nothing would be added; if the value wasn't
a multiple of 32, the ends wouldn't be added in.

Fixes #837

Copy link
Contributor

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

ACK, mind adding a changelog entry?

This change fixes an insidious bug that unfortunately
tried to split values in multiples of 32, but unfortunately
due to the loop conditions, if the length of trace.Memory
was less than 32, nothing would be added; if the value wasn't
a multiple of 32, the ends wouldn't be added in.

Fixes #837
@odeke-em odeke-em force-pushed the x-evm-types-fix-32-splitting-code branch from 823b7ba to 39f0844 Compare December 15, 2021 02:26
@odeke-em
Copy link
Contributor Author

ACK, mind adding a changelog entry?

Done, and thank you @fedekunze!

@odeke-em odeke-em enabled auto-merge (squash) December 15, 2021 02:27
@odeke-em odeke-em merged commit 6629208 into main Dec 15, 2021
@odeke-em odeke-em deleted the x-evm-types-fix-32-splitting-code branch December 15, 2021 02:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

x/evm/types: invalid code in trace.Memory splitting if value is not a multiple of 32
2 participants