Skip to content

Commit

Permalink
copy jump table before executing last opcode
Browse files Browse the repository at this point in the history
  • Loading branch information
kstoykov committed Aug 30, 2024
1 parent e4de444 commit b628bd0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/vm/interpreter_zkevm.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,9 @@ func (in *EVMInterpreter) RunZk(contract *Contract, input []byte, readOnly bool)
// because pc and pcCopy can be different only if the main loop finishes normally without error
// but is it finishes normally without error then "ret" != nil and the .execute below will never be invoked at all

overrideJumpTableForLastOpcode(in.jt, in.evm.ChainRules())
in.jt[op].execute(pc, in, callContext)
jtForLastOpCode := copyJumpTable(in.jt)
overrideJumpTableForLastOpcode(jtForLastOpCode, in.evm.ChainRules())
jtForLastOpCode[op].execute(pc, in, callContext)
}
}()

Expand Down

0 comments on commit b628bd0

Please sign in to comment.