panic: interface conversion: interface {} is nil, not string
Closed this issue · 7 comments
Nyx2022 commented
Zxilly commented
能提供样本吗,没有样本不太好分析。
暂时可以使用 --no-dwarf
来跳过 dwarf pass。
Zxilly commented
看着像是在 msvc 下编译的 cgo? 处理 ucrt 的时候似乎有点问题。
Nyx2022 commented
能提供样本吗,没有样本不太好分析。
暂时可以使用
--no-dwarf
来跳过 dwarf pass。
好的, 但是样本确实目前不太方便提供
Nyx2022 commented
看着像是在 msvc 下编译的 cgo? 处理 ucrt 的时候似乎有点问题。
我的样本是在ucrt的llvm下编译的。然后你这个程序我是直接下载的release中的
Zxilly commented
麻烦提供完整的日志,使用 --verbose flag
Nyx2022 commented
time=0s level=DEBUG msg="memory limit: 8.6 GB"
time=0s level=INFO msg="Parsing binary..."
time=117.7609ms level=INFO msg="Parsing binary done"
time=117.7609ms level=INFO msg="Finding build info..."
time=117.7609ms level=INFO msg="Build info found"
time=117.7609ms level=INFO msg="Loading sections..."
time=117.7609ms level=INFO msg="Loading sections done"
time=117.7609ms level=INFO msg="Loading packages..."
time=387.4047ms level=INFO msg="Loading packages done"
time=548.032ms level=WARN msg="no location attribute for dwarf.Field{Attr:dwarf.AttrName, Val:\"argret\", Class:dwarf.ClassString}dwarf.Field{Attr:dwarf.AttrType, Val:0x54, Class:dwarf.ClassReference}dwarf.Field{Attr:dwarf.AttrDeclFile, Val:2, Class:dwarf.ClassConstant}dwarf.Field{Attr:dwarf.AttrDeclLine, Val:69, Class:dwarf.ClassConstant}"
time=548.032ms level=WARN msg="Failed to execute location attribute for dwarf.Field{Attr:dwarf.AttrName, Val:\"has_cctor\", Class:dwarf.ClassString}dwarf.Field{Attr:dwarf.AttrType, Val:0x54, Class:dwarf.ClassReference}dwarf.Field{Attr:dwarf.AttrDeclFile, Val:2, Class:dwarf.ClassConstant}dwarf.Field{Attr:dwarf.AttrDeclLine, Val:72, Class:dwarf.ClassConstant}dwarf.Field{Attr:dwarf.AttrLocation, Val:[]uint8{0x3, 0x68, 0xd0, 0x3f, 0x43, 0x1, 0x0, 0x0, 0x0, 0x94, 0x1, 0x31, 0x1e, 0x30, 0x22, 0x9f}, Class:dwarf.ClassExprLoc}: memory read unavailable"
panic: interface conversion: interface {} is nil, not string
goroutine 1 [running]:
github.com/Zxilly/go-size-analyzer/internal/knowninfo.(*KnownInfo).AddDwarfVariable(0xc00061eea0, 0xc00a3afbc0, 0xc000002180, 0xc00a3b1220, 0x8)
github.com/Zxilly/go-size-analyzer/internal/knowninfo/dwarf.go:48 +0x144c
github.com/Zxilly/go-size-analyzer/internal/knowninfo.(*KnownInfo).LoadDwarfCompileUnit(0xc00061eea0, 0xc000002180, 0xc00a3afb90, {0xc00f967c00, 0x1d, 0x10?}, 0x8)
github.com/Zxilly/go-size-analyzer/internal/knowninfo/dwarf.go:185 +0x113
github.com/Zxilly/go-size-analyzer/internal/knowninfo.(*KnownInfo).TryLoadDwarf(...)
github.com/Zxilly/go-size-analyzer/internal/knowninfo/dwarf.go:226
github.com/Zxilly/go-size-analyzer/internal.Analyze({0xc000024140, 0x4c}, {0x1355400, 0xc000006870}, 0x8319a00, {0x0?, 0x0?, 0x0?})
github.com/Zxilly/go-size-analyzer/internal/analyze.go:61 +0x1128
main.entry()
github.com/Zxilly/go-size-analyzer/cmd/gsa/entry.go:37 +0xa6
main.main()
github.com/Zxilly/go-size-analyzer/cmd/gsa/main.go:8 +0x13