neo-go/pkg/vm
Roman Khimov 270f0d2d7a vm: fix incorrect refcounting in POPITEM
We're popping an item (array) off the stack, OK, it triggers refs.Remove() for
it. Then we're pushing an inner item to the stack, OK, it triggers refs.Add()
for this element. Why are we removing it afterwards? Looks like something went
wrong in 324107b31e (and https://github.com/nspcc-dev/neo-go/pull/1670)
since a simple test shows zero counter after POPITEM and -1 after popping the
only item left on the stack.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2024-11-16 18:03:25 +03:00
..
emit emit: add some package doc 2024-11-07 18:44:55 +03:00
invocations vm: move InvocationTree into a package of its own 2022-07-08 23:30:30 +03:00
opcode *: improve for loop syntax 2024-08-30 21:45:18 +03:00
stackitem *: fix some dupword warnings 2024-11-13 20:57:10 +03:00
testdata core: fix formatted error on transaction verification 2023-07-21 13:50:20 +03:00
vmstate vm: move State type into a package of its own 2022-07-08 18:34:52 +03:00
bench_test.go *: improve for loop syntax 2024-08-30 21:45:18 +03:00
context.go vm: expose Context slots, hide Set/ClearRefs on Slot, deprecate Dump*Slot methods 2024-11-15 11:05:42 +01:00
contract_checks.go *: fix linter exhaustive errors 2024-09-26 13:29:03 +03:00
contract_checks_test.go *: improve for loop syntax 2024-08-30 21:45:18 +03:00
debug_test.go cli: add delete and list break point commands 2024-11-14 09:52:25 +01:00
exception.go *: replace interface{} with any keyword 2023-04-04 13:22:42 +03:00
fuzz_test.go *: drop go 1.18 support in doc and build targets 2023-10-12 17:59:42 +03:00
invocation_tree_test.go vm: don't use Stack for istack 2022-11-18 11:35:29 +03:00
iterator_test.go vm: Add tests for iterator unwrap scripts 2023-12-29 10:50:43 +03:00
json_test.go vm: expose Context slots, hide Set/ClearRefs on Slot, deprecate Dump*Slot methods 2024-11-15 11:05:42 +01:00
opcodebench_test.go *: improve for loop syntax 2024-08-30 21:45:18 +03:00
ref_counter.go vm: optimize refcounter 2022-08-23 13:18:06 +03:00
ref_counter_test.go vm: fix incorrect refcounting in POPITEM 2024-11-16 18:03:25 +03:00
slot.go vm: expose Context slots, hide Set/ClearRefs on Slot, deprecate Dump*Slot methods 2024-11-15 11:05:42 +01:00
slot_test.go vm: expose Context slots, hide Set/ClearRefs on Slot, deprecate Dump*Slot methods 2024-11-15 11:05:42 +01:00
stack.go *: improve for loop syntax 2024-08-30 21:45:18 +03:00
stack_test.go *: improve for loop syntax 2024-08-30 21:45:18 +03:00
vm.go vm: fix incorrect refcounting in POPITEM 2024-11-16 18:03:25 +03:00
vm_test.go vm: fix MODPOW operation 2024-10-31 17:49:02 +03:00