volatilityfoundation / dwarf2json

convert ELF/DWARF symbol and type information into vol3's intermediate JSON
Other
106 stars 28 forks source link

runtime: goroutine stack exceeds 1000000000-byte limit #30

Closed garanews closed 3 years ago

garanews commented 3 years ago
gara@z840:~/Documents/dwarf2json$ du -h /home/gara/Downloads/red8/usr/lib/debug/lib/modules/4.18.0-240.15.1.el8_3.x86_64/vmlinux
780M    /home/gara/Downloads/red8/usr/lib/debug/lib/modules/4.18.0-240.15.1.el8_3.x86_64/vmlinux

gara@z840:~/Documents/dwarf2json$ ./dwarf2json linux --elf /home/gara/Downloads/red8/usr/lib/debug/lib/modules/4.18.0-240.15.1.el8_3.x86_64/vmlinux > r8.json
runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc0521803a0 stack=[0xc052180000, 0xc072180000]
fatal error: stack overflow

runtime stack:
runtime.throw(0x56280f, 0xe)
        /snap/go/7013/src/runtime/panic.go:1116 +0x72
runtime.newstack()
        /snap/go/7013/src/runtime/stack.go:1067 +0x78d
runtime.morestack()
        /snap/go/7013/src/runtime/asm_amd64.s:449 +0x8f

goroutine 1 [running]:
runtime.mallocgc(0x9, 0x0, 0x40e100, 0xc00d714800)
        /snap/go/7013/src/runtime/malloc.go:903 +0xa8b fp=0xc0521803b0 sp=0xc0521803a8 pc=0x40e86b
runtime.rawstring(0x9, 0x0, 0x0, 0x0, 0x0, 0x0)
        /snap/go/7013/src/runtime/string.go:263 +0x4f fp=0xc0521803e0 sp=0xc0521803b0 pc=0x44f1ef
runtime.rawstringtmp(0x0, 0x9, 0x44ebb4, 0x7, 0xc0293f0210, 0x7, 0xc0293f0210)
        /snap/go/7013/src/runtime/string.go:131 +0x74 fp=0xc052180420 sp=0xc0521803e0 pc=0x44ebb4
runtime.concatstrings(0x0, 0xc052180500, 0x3, 0x3, 0xc0293f0210, 0xc0293f0215)
        /snap/go/7013/src/runtime/string.go:50 +0xc5 fp=0xc0521804b8 sp=0xc052180420 pc=0x44e605
runtime.concatstring3(0x0, 0x560823, 0x6, 0x5600a8, 0x1, 0xc018eb017c, 0x2, 0xc0293f0210, 0x7)
        /snap/go/7013/src/runtime/string.go:63 +0x47 fp=0xc0521804f8 sp=0xc0521804b8 pc=0x44e907
debug/dwarf.(*StructType).String(0xc0001b8ea0, 0x56056e, 0x5)
        /snap/go/7013/src/debug/dwarf/type.go:164 +0x71 fp=0xc052180550 sp=0xc0521804f8 pc=0x4cb1d1
debug/dwarf.(*StructType).Defn(0xc018fca840, 0xc052180640, 0x44e887)
        /snap/go/7013/src/debug/dwarf/type.go:183 +0x106 fp=0xc0521805f8 sp=0xc052180550 pc=0x4cb346
debug/dwarf.(*StructType).String(0xc018fca840, 0x560823, 0x6)
        /snap/go/7013/src/debug/dwarf/type.go:166 +0x98 fp=0xc052180650 sp=0xc0521805f8 pc=0x4cb1f8
debug/dwarf.(*StructType).Defn(0xc018fca7e0, 0xc052180740, 0x44e887)
        /snap/go/7013/src/debug/dwarf/type.go:183 +0x106 fp=0xc0521806f8 sp=0xc052180650 pc=0x4cb346
debug/dwarf.(*StructType).String(0xc018fca7e0, 0xc0293ead80, 0xbd)
        /snap/go/7013/src/debug/dwarf/type.go:166 +0x98 fp=0xc052180750 sp=0xc0521806f8 pc=0x4cb1f8
debug/dwarf.(*StructType).Defn(0xc00012f140, 0xc052180840, 0x44e887)
garanews commented 3 years ago

I can confirm that https://github.com/volatilityfoundation/dwarf2json/pull/28 solve this issue.

ilch1 commented 3 years ago

I can confirm that #28 solve this issue.

Great! #28 is now merged.