Skip to content

[R4R] correct logic for eip check of NewEVMInterpreter#953

Merged
brilliant-lx merged 2 commits intobnb-chain:developfrom
qinglin89:fix-evm
Jun 24, 2022
Merged

[R4R] correct logic for eip check of NewEVMInterpreter#953
brilliant-lx merged 2 commits intobnb-chain:developfrom
qinglin89:fix-evm

Conversation

@qinglin89
Copy link
Copy Markdown
Contributor

@qinglin89 qinglin89 commented Jun 20, 2022

Description

current code logic of for...range...check to delete elements in slice is not correct, would skip checking the element next to the element be deleted of which error was detected.

for i, v := range slice{
   // check slice[i]
    slice = append(slice[:i], slice[i+1:]...)
}

Rationale

declare a new slice for left eipIDs

Changes

core/vm/interpreter.go : NewEVMInterpreter(...)

Copy link
Copy Markdown
Contributor

@setunapo setunapo left a comment

Choose a reason for hiding this comment

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

LGTM

@qinglin89
Copy link
Copy Markdown
Contributor Author

also submitted pr as etherum/go-ethereum#25131

@forcodedancing
Copy link
Copy Markdown
Contributor

LGTM

@brilliant-lx brilliant-lx merged commit 128977c into bnb-chain:develop Jun 24, 2022
This was referenced Jul 28, 2022
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.

6 participants