goretk/gore

GetTypes panic: runtime error: invalid memory address or nil pointer dereference.

Closed this issue · 1 comments

here is the scan file md5sum: 02bf1d9f09eb370101bf971c0a0214bc
you can download this file from url below

https://www.virustotal.com/gui/file/56b110a95c2b16784ba053c69f3ffcdbffcef1fdf42214f71d61b9e0d59b9a42

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x58ad15]

goroutine 1 [running]:
github.com/goretk/gore.typeParse(0xd76fe0, 0xc0000c7b00, 0x295800, {0xc001bb6000, 0x435600, 0x435600}, 0x401000)
/home/nobody/go/pkg/mod/github.com/goretk/gore@v0.10.0/type.go:497 +0x11d5
github.com/goretk/gore.typeParse(0xc00000e540, 0xc0000c7b00, 0x21d6e0, {0xc001bb6000, 0x435600, 0x435600}, 0x401000)
/home/nobody/go/pkg/mod/github.com/goretk/gore@v0.10.0/type.go:578 +0xaed
github.com/goretk/gore.getLegacyTypes(0xc0000c7b00, {0xd7da98, 0xc00000e540})
/home/nobody/go/pkg/mod/github.com/goretk/gore@v0.10.0/type.go:129 +0x271
github.com/goretk/gore.getTypes(0xc0000c7b00, {0xd7da98, 0xc00000e540})
/home/nobody/go/pkg/mod/github.com/goretk/gore@v0.10.0/type.go:60 +0x3b1
github.com/goretk/gore.(*GoFile).GetTypes(0xc0009f4000)
/home/nobody/go/pkg/mod/github.com/goretk/gore@v0.10.0/file.go:319 +0x71

I think this error happens because it doesn't detect the correct compiler version. You can force the assumed compiler version by setting after the file has been opened. Redress has a flag for the command that does the same.