Skip to content

Commit

Permalink
Fix fast VM storeMemUnaligned()
Browse files Browse the repository at this point in the history
  • Loading branch information
ImTei committed Mar 27, 2024
1 parent 11f1cb9 commit c038445
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 c038445

Please sign in to comment.