Skip to content

Conversation

@benmoss
Copy link
Contributor

@benmoss benmoss commented Feb 27, 2022

I think this might fix #24. I was hitting it while trying go-callvis -focus cuelang.org/go/cue/cmd ./cmd/cue and getting

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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/go/pointer/solve.go:165 +0x24b
golang.org/x/tools/go/pointer.(*analysis).solve(0xc02caebdc0)
        /home/cesium/go/pkg/mod/golang.org/x/[email protected]/go/pointer/solve.go:59 +0x2cd
golang.org/x/tools/go/pointer.Analyze(0xc02d020aa0)
        /home/cesium/go/pkg/mod/golang.org/x/[email protected]/go/pointer/analysis.go:331 +0xa12
main.doAnalysis({0x0, 0xc0000200a0}, 0x2e, {0xc000020110, 0x458145, 0xc0000001a0})
        /home/cesium/go/pkg/mod/github.com/ofabry/[email protected]/analysis.go:50 +0x165
main.main()
        /home/cesium/go/pkg/mod/github.com/ofabry/[email protected]/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 golang/go#25090 to the reported fix in golang/go#45735, so figured bumping the dependency was in order, and lo and behold my panic is gone 🎉

@ondrajz ondrajz added the bug label May 16, 2022
@ondrajz ondrajz merged commit 0a3cbd8 into ondrajz:master May 16, 2022
@ondrajz
Copy link
Owner

ondrajz commented May 16, 2022

Thank you!

@titpetric
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Internal panic in pointer analysis

3 participants