Closed benmoss closed 2 years ago
I think this might fix #24. I was hitting it while trying go-callvis -focus cuelang.org/go/cue/cmd ./cmd/cue and getting
go-callvis -focus cuelang.org/go/cue/cmd ./cmd/cue
Internal panic in pointer analysis: goroutine 1 [running]: runtime/debug.Stack() /home/cesium/sdk/go1.17.4/src/runtime/debug/stack.go:24 +0x65 runtime/debug.PrintStack() /home/cesium/sdk/go1.17.4/src/runtime/debug/stack.go:16 +0x19 golang.org/x/tools/go/pointer.Analyze.func1() /home/cesium/go/pkg/mod/golang.org/x/tools@v0.0.0-20200305224536-de023d59a5d1/go/pointer/analysis.go:227 +0xca panic({0x9d8a40, 0xc029a2eee0}) /home/cesium/sdk/go1.17.4/src/runtime/panic.go:1038 +0x215 golang.org/x/tools/go/ssa.(*Program).LookupMethod(0xc01560a280, {0xb29830, 0xc014953300}, 0x64, {0xc00f9e31f8, 0x6}) /home/cesium/go/pkg/mod/golang.org/x/tools@v0.0.0-20200305224536-de023d59a5d1/go/ssa/methods.go:49 +0x119 golang.org/x/tools/go/pointer.(*invokeConstraint).solve(0xc027b6a780, 0xc02caebdc0, 0xa3d540) /home/cesium/go/pkg/mod/golang.org/x/tools@v0.0.0-20200305224536-de023d59a5d1/go/pointer/solve.go:326 +0x1ec golang.org/x/tools/go/pointer.(*analysis).solveConstraints(0xc02caebdc0, 0xc030d262a0, 0xc02060ca80) /home/cesium/go/pkg/mod/golang.org/x/tools@v0.0.0-20200305224536-de023d59a5d1/go/pointer/solve.go:165 +0x24b golang.org/x/tools/go/pointer.(*analysis).solve(0xc02caebdc0) /home/cesium/go/pkg/mod/golang.org/x/tools@v0.0.0-20200305224536-de023d59a5d1/go/pointer/solve.go:59 +0x2cd golang.org/x/tools/go/pointer.Analyze(0xc02d020aa0) /home/cesium/go/pkg/mod/golang.org/x/tools@v0.0.0-20200305224536-de023d59a5d1/go/pointer/analysis.go:331 +0xa12 main.doAnalysis({0x0, 0xc0000200a0}, 0x2e, {0xc000020110, 0x458145, 0xc0000001a0}) /home/cesium/go/pkg/mod/github.com/ofabry/go-callvis@v0.6.1/analysis.go:50 +0x165 main.main() /home/cesium/go/pkg/mod/github.com/ofabry/go-callvis@v0.6.1/main.go:106 +0x237 2022/02/27 11:49:13 internal error in pointer analysis: *cuelang.org/go/cue/ast.Field has no method Source (please report this bug)
I tracked down https://github.com/golang/go/issues/25090 to the reported fix in https://github.com/golang/go/issues/45735, so figured bumping the dependency was in order, and lo and behold my panic is gone 🎉
Thank you!
Just as a note: I'm asuming a new release tag hasn't been added. I hit this by using go install with @latest, and resolved by using @master.
go install
@latest
@master
I think this might fix #24. I was hitting it while trying
go-callvis -focus cuelang.org/go/cue/cmd ./cmd/cue
and gettingI tracked down https://github.com/golang/go/issues/25090 to the reported fix in https://github.com/golang/go/issues/45735, so figured bumping the dependency was in order, and lo and behold my panic is gone 🎉