Skip to content

Commit

Permalink
Merge pull request ethereum-optimism#32 from ethereum-optimism/tip/fi…
Browse files Browse the repository at this point in the history
…x-storeMemUnaligned

Fix fast VM storeMemUnaligned()
  • Loading branch information
ImTei authored Mar 30, 2024
2 parents 11f1cb9 + c038445 commit 45dae21
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion rvgo/fast/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func (inst *InstrumentedState) riscvStep() (outErr error) {
inst.trackMemAccess(rightAddr, proofIndexR)
}
inst.verifyMemChange(rightAddr, proofIndexR)
s.Memory.SetUnaligned(addr, bytez[leftSize:size])
s.Memory.SetUnaligned(rightAddr, bytez[leftSize:size])
}

storeMem := func(addr U64, size U64, value U64, proofIndexL uint8, proofIndexR uint8, verifyL bool, verifyR bool) {
Expand Down
1 change: 0 additions & 1 deletion rvgo/test/syscall_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,6 @@ func FuzzStateSyscallGetrlimit(f *testing.F) {

testGetrlimit := func(t *testing.T, addr, pc, step uint64) {
pc = pc & 0xFF_FF_FF_FF_FF_FF_FF_FC // align PC
addr = addr &^ 31
state := &fast.VMState{
PC: pc,
Heap: 0,
Expand Down

0 comments on commit 45dae21

Please sign in to comment.