core/vm/runtime: avoid overflow on 32-bit

This commit is contained in:
Martin Holst Swende 2024-11-04 15:03:39 +01:00
parent 32b1831920
commit 726db0d3d0
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0

View file

@ -477,7 +477,7 @@ func BenchmarkSimpleLoop(b *testing.B) {
p, lbl = program.New().Jumpdest() p, lbl = program.New().Jumpdest()
loopingCode2 := p. loopingCode2 := p.
Push(0x01020304).Push(0x0102030405). Push(0x01020304).Push(uint64(0x0102030405)).
Ops(vm.POP, vm.POP). Ops(vm.POP, vm.POP).
Op(vm.PUSH6).Append(make([]byte, 6)).Op(vm.JUMP). // Jumpdest zero expressed in 6 bytes Op(vm.PUSH6).Append(make([]byte, 6)).Op(vm.JUMP). // Jumpdest zero expressed in 6 bytes
Bytecode() Bytecode()