This repository was archived by the owner on Jul 5, 2024. It is now read-only.
Bug: fix to truncate offset from Word to Uint64 when length is zero for some opcodes#1415
Merged
ChihChengLiang merged 9 commits intoMay 20, 2023
Conversation
a6ea6d6 to
5eb2f24
Compare
lispc
approved these changes
May 19, 2023
ChihChengLiang
approved these changes
May 19, 2023
Collaborator
ChihChengLiang
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the fix and adding tests.
Collaborator
|
@silathdiir a rebase to main to apply the CI fix is required to merge this. |
auto-merge was automatically disabled
May 19, 2023 13:33
Head branch was pushed to by a user without write access
0100bf1 to
03f1a14
Compare
03f1a14 to
9030455
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Reference go-ethereum function calcMemSize64WithUint, ignore to check Uint64 overflow for memory offset if length is zero.
it is also called by calcMemSize64. And both are used for opcodes in memory_table.go as
memorySizein jump_table.go.For Call opcodes, in offset and size are truncated to Uint64 as opCall.
Issue Link
Related issue #1301
Original local PR scroll-tech#393
Type of change
How Has This Been Tested?
testoolcaserandomStatetest85_d0_g0_v0.