ondrajz / go-callvis

Visualize call graph of a Go program using Graphviz
https://ofabry.github.io/go-callvis
MIT License
5.82k stars 402 forks source link

internal error in pointer analysis: not a *reflect.rtype-tagged object #185

Open tappoz opened 2 weeks ago

tappoz commented 2 weeks ago
go version go1.21.0 linux/amd64

went to the project directory where the go.mod file is located, then tried both:

same error:

Internal panic in pointer analysis:
goroutine 1 [running]:
runtime/debug.Stack()
    /usr/local/go/src/runtime/debug/stack.go:24 +0x5e
runtime/debug.PrintStack()
    /usr/local/go/src/runtime/debug/stack.go:16 +0x13
golang.org/x/tools/go/pointer.Analyze.func1()
    /home/<my-user>/go/pkg/mod/golang.org/x/tools@v0.8.0/go/pointer/analysis.go:225 +0xc5
panic({0xa421c0?, 0xc08a8988b0?})
    /usr/local/go/src/runtime/panic.go:914 +0x21f
golang.org/x/tools/go/pointer.(*analysis).rtypeTaggedValue(0xc078138200, 0x0?)
    /home/<my-user>/go/pkg/mod/golang.org/x/tools@v0.8.0/go/pointer/gen.go:213 +0x128
golang.org/x/tools/go/pointer.(*reflectMakeSliceConstraint).solve(0xc0c0784c10, 0xc078138200, 0x0?)
    /home/<my-user>/go/pkg/mod/golang.org/x/tools@v0.8.0/go/pointer/reflect.go:1242 +0xe5
golang.org/x/tools/go/pointer.(*analysis).solveConstraints(0xc078138200, 0xc0a73885d0, 0xc06c8be9c0)
    /home/<my-user>/go/pkg/mod/golang.org/x/tools@v0.8.0/go/pointer/solve.go:163 +0x72
golang.org/x/tools/go/pointer.(*analysis).solve(0xc078138200)
    /home/<my-user>/go/pkg/mod/golang.org/x/tools@v0.8.0/go/pointer/solve.go:59 +0x2bf
golang.org/x/tools/go/pointer.Analyze(0xc03ef323c0)
    /home/<my-user>/go/pkg/mod/golang.org/x/tools@v0.8.0/go/pointer/analysis.go:329 +0xc2c
main.(*analysis).DoAnalysis(0xc000156a00, {0xb04884, 0x7}, {0x0, 0x0}, 0x0, {0xc000118170, 0x1, 0x1})
    /home/<my-user>/go/pkg/mod/github.com/ofabry/go-callvis@v0.7.0/analysis.go:129 +0x5f5
main.main()
    /home/<my-user>/go/pkg/mod/github.com/ofabry/go-callvis@v0.7.0/main.go:145 +0x28a
2024/06/19 09:56:03 internal error in pointer analysis: not a *reflect.rtype-tagged object: obj=n151394 tag=*reflect.rtype payload=n151395 (please report this bug)