Skip to content

Crash on OP_UTXOTOKENCATEGORY #19

Open
@dagurval

Description

@dagurval

When executing OP_UTXOTOKENCATEGORY (F4) followed by step back and forward again (so F4 F3 F4) causes a crash.

Example:

% meep debug -t 499ca8e57d0ebd358f159f4ca2140ad1c3efd851bb0cc43af28c13a9d107f7b5
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xda83178]

goroutine 1 [running]:
github.com/gcash/bchd/txscript.(*UtxoCache).GetEntry(0x0, 0xd67cd33?)
	/Users/dagurval/bchd/txscript/hashcache.go:127 +0x58
github.com/gcash/bchd/txscript.opcodeUtxoTokenCategory(0xd6259e9?, 0xc000499400)
	/Users/dagurval/bchd/txscript/opcode.go:3298 +0xea
github.com/gcash/bchd/txscript.(*Engine).executeOpcode(0xc000499400?, 0xc0003e7560?)
	/Users/dagurval/bchd/txscript/engine.go:240 +0x2a4
github.com/gcash/bchd/txscript.(*Engine).Step(0xc000499400)
	/Users/dagurval/bchd/txscript/engine.go:389 +0x85
main.(*Debug).Execute(0xc0000c69b0, {0xdd351e0?, 0x7ff7b3973801?, 0x1?})
	/Users/dagurval/meep/debug.go:380 +0x2cfe
github.com/jessevdk/go-flags.(*Parser).ParseArgs(0xc0000c53b0, {0xc0000340d0, 0x3, 0x3})
	/Users/dagurval/go/pkg/mod/github.com/jessevdk/[email protected]/parser.go:339 +0xae3
github.com/jessevdk/go-flags.(*Parser).Parse(...)
	/Users/dagurval/go/pkg/mod/github.com/jessevdk/[email protected]/parser.go:195
main.main()
	/Users/dagurval/meep/main.go:33 +0x1a5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions