go-callvis
go-callvis copied to clipboard
Generate call and report error
Unable to generate call graph
$ go-callvis main.go
panic: in crypto/sha256.Sum224: cannot convert slice t0[:] ([]byte) to *[28]byte
goroutine 3336 [running]:
golang.org/x/tools/go/ssa.emitConv(0xc014ef7900, {0xb8b0d8, 0xc020b80600}, {0xb86bb8?, 0xc00b8da4c0})
/home/chenchong/.local/pkg/mod/golang.org/x/[email protected]/go/ssa/emit.go:242 +0x7c7
golang.org/x/tools/go/ssa.(*builder).expr0(0xa2b440?, 0xc014ef7900, {0xb87ad8?, 0xc00b66af00}, {0x7, {0xb86bb8, 0xc00b8da4c0}, {0x0, 0x0}})
/home/chenchong/.local/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:573 +0x925
golang.org/x/tools/go/ssa.(*builder).expr(0xc0204dd6b8?, 0xc014ef7900, {0xb87ad8?, 0xc00b66af00?})
/home/chenchong/.local/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:530 +0x19f
golang.org/x/tools/go/ssa.(*builder).assign(0xc014ef7900?, 0xc014ef7900?, {0xb88dc0?, 0xc0204fab70}, {0xb87ad8?, 0xc00b66af00?}, 0x0?, 0xc019a995d0)
/home/chenchong/.local/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:502 +0x3db
golang.org/x/tools/go/ssa.(*builder).assignStmt(0xa0cb40?, 0xc014ef7900, {0xc00b66e500, 0x1, 0x2?}, {0xc00b66e520, 0x1, 0xc0204f54c0?}, 0x1)
/home/chenchong/.local/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:1050 +0x25d
golang.org/x/tools/go/ssa.(*builder).stmt(0x0?, 0xc014ef7900, {0xb87958?, 0xc00b66af40?})
/home/chenchong/.local/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2009 +0x1094
golang.org/x/tools/go/ssa.(*builder).stmtList(0x0?, 0x7f7ac78fc828?, {0xc00b656780?, 0x7, 0x20?})
/home/chenchong/.local/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:790 +0x67
golang.org/x/tools/go/ssa.(*builder).stmt(0xc014ef7900?, 0xc014ef7900, {0xb87a78?, 0xc00b66c7e0?})
/home/chenchong/.local/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2105 +0x1331
golang.org/x/tools/go/ssa.(*builder).buildFunction(0xa2b740?, 0xc014ef7900)
/home/chenchong/.local/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2198 +0x465
golang.org/x/tools/go/ssa.(*builder).buildFuncDecl(0xa2b740?, 0xc019efae40, 0xc00b66c810)
/home/chenchong/.local/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2228 +0x154
golang.org/x/tools/go/ssa.(*Package).build(0xc019efae40)
/home/chenchong/.local/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2344 +0xd05
sync.(*Once).doSlow(0xc0066760b0?, 0xc006447638?)
/opt/golang/default/src/sync/once.go:68 +0xc2
sync.(*Once).Do(...)
/opt/golang/default/src/sync/once.go:59
golang.org/x/tools/go/ssa.(*Package).Build(...)
/home/chenchong/.local/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2263
golang.org/x/tools/go/ssa.(*Program).Build.func1(0x0?)
/home/chenchong/.local/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2247 +0x4c
created by golang.org/x/tools/go/ssa.(*Program).Build
/home/chenchong/.local/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2246 +0x19c
My golang version
$ go version
go version go1.18 linux/amd64
My project go Mod information
module XXX
go 1.16
require (
...
)
downgrade go version below 1.17 may be fine. I test go versioin between 1.18.2 and 1.16.8, and latter version is ok
downgrade go version below 1.17 may be fine. I test go versioin between 1.18.2 and 1.16.8, and latter version is ok
1.17 is ok.
Same as #115