neoneo-go/pkg/vm
Anna Shaleva 913e3878c5 vm CLI: check whether VM is ready before jumping to the instruction
It allows to avoid panic:
```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0xdab469]

goroutine 1 [running]:
github.com/nspcc-dev/neo-go/pkg/vm.(*VM).Jump(...)
	github.com/nspcc-dev/neo-go/pkg/vm/vm.go:1506
github.com/nspcc-dev/neo-go/pkg/vm/cli.handleRun(0xc0005988f0)
	github.com/nspcc-dev/neo-go/pkg/vm/cli/cli.go:413 +0x2e9
github.com/abiosoft/ishell/v2.(*Shell).handleCommand(0xc0004320f0, {0xc00032c7c0, 0xc0002a3920, 0x0})
	github.com/abiosoft/ishell/v2@v2.0.2/ishell.go:279 +0x143
github.com/abiosoft/ishell/v2.handleInput(0xc0004320f0, {0xc00032c7c0, 0x3, 0x4})
	github.com/abiosoft/ishell/v2@v2.0.2/ishell.go:233 +0x31
github.com/abiosoft/ishell/v2.(*Shell).run(0xc0004320f0)
	github.com/abiosoft/ishell/v2@v2.0.2/ishell.go:212 +0x30f
github.com/abiosoft/ishell/v2.(*Shell).Run(0xc0004320f0)
	github.com/abiosoft/ishell/v2@v2.0.2/ishell.go:112 +0x28
github.com/nspcc-dev/neo-go/pkg/vm/cli.(*VMCLI).Run(0xc000224030)
	github.com/nspcc-dev/neo-go/pkg/vm/cli/cli.go:538 +0x39
github.com/nspcc-dev/neo-go/cli/vm.startVMPrompt(0xc0001f46e0)
	github.com/nspcc-dev/neo-go/cli/vm/vm.go:28 +0xb4
github.com/urfave/cli.HandleAction({0xe65fa0, 0x1161c68}, 0x2)
	github.com/urfave/cli@v1.22.5/app.go:524 +0xa8
github.com/urfave/cli.Command.Run({{0xfed435, 0x2}, {0x0, 0x0}, {0x0, 0x0, 0x0}, {0x100576d, 0x19}, {0x0, ...}, ...}, ...)
	github.com/urfave/cli@v1.22.5/command.go:173 +0x652
github.com/urfave/cli.(*App).Run(0xc0001016c0, {0xc0000c6000, 0x2, 0x2})
	github.com/urfave/cli@v1.22.5/app.go:277 +0x705
main.main()
	./main.go:19 +0x33
```
2021-09-08 17:53:09 +03:00
..
cli vm CLI: check whether VM is ready before jumping to the instruction 2021-09-08 17:53:09 +03:00
emit vm/emit: improve error message 2021-07-22 14:23:32 +03:00
opcode opcode: optimize IsValid 2021-08-02 21:46:19 +03:00
stackitem stackitem: avoid going through Value() in serialization 2021-08-23 18:29:07 +03:00
testdata opcode: fix GTE, LTE string representations 2021-04-29 16:08:48 +03:00
bench_test.go vm: rework stack as a simple slice 2021-08-24 15:28:14 +03:00
context.go vm: don't use PushVal when item type is known 2021-08-30 23:43:58 +03:00
contract_checks.go stackitem: completely drop MaxArraySize 2021-07-19 15:42:42 +03:00
contract_checks_test.go core: refactor Neo.Crypto.CheckMultisigWithECDsaSecpr1 2021-03-10 21:46:05 +03:00
debug_test.go vm: rework stack as a simple slice 2021-08-24 15:28:14 +03:00
exception.go stackitem: change Bool() to TryBool(), prepare for its failures 2020-08-21 20:55:20 +03:00
interop.go interop: remove System.Iterator.Create, fix #1935 2021-05-11 12:13:30 +03:00
json_test.go vm: embed reference counter in compound items 2021-08-13 14:41:26 +03:00
opcodebench_test.go opcode: fix GTE, LTE string representations 2021-04-29 16:08:48 +03:00
ref_counter.go vm: embed reference counter in compound items 2021-08-13 14:41:26 +03:00
ref_counter_test.go vm: embed reference counter in compound items 2021-08-13 14:41:26 +03:00
slot.go vm: store refcounter directly in VM 2021-08-11 13:25:58 +03:00
slot_test.go vm: allow to initialize static slot in method 2020-07-27 13:00:35 +03:00
stack.go vm: don't use PushVal when item type is known 2021-08-30 23:43:58 +03:00
stack_test.go vm: rework stack as a simple slice 2021-08-24 15:28:14 +03:00
state.go remove github.com/pkg/errors from dependencies 2020-08-07 12:21:52 +03:00
state_test.go core, vm: store VMState as byte instead of string 2020-07-29 10:14:08 +03:00
vm.go vm: don't use PushVal when item type is known 2021-08-30 23:43:58 +03:00
vm_test.go vm: rework stack as a simple slice 2021-08-24 15:28:14 +03:00