Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/go/pointer: not a *reflect.rtype-tagged object: obj=n55976 tag=*reflect.rtype payload=n55977 (please report this bug) #27046

Closed
dominikh opened this issue Aug 17, 2018 · 1 comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@dominikh
Copy link
Member

What version of Go are you using (go version)?

go version devel +81555cb4f3 Tue Aug 14 09:19:38 2018 +0000 linux/amd64

What did you do?

https://play.golang.org/p/aSTthX9T9F9

What did you see?

Depending on the order of packages passed to ssautil.Packages, PTA may either run into this bug

Internal panic in pointer analysis:
goroutine 1 [running]:
runtime/debug.Stack(0x24, 0x0, 0x0)
	/home/dominikh/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
	/home/dominikh/go/src/runtime/debug/stack.go:16 +0x22
golang.org/x/tools/go/pointer.Analyze.func1(0xc000053da8)
	/home/dominikh/prj/src/golang.org/x/tools/go/pointer/analysis.go:227 +0x10b
panic(0x6ba560, 0xc00d29f940)
	/home/dominikh/go/src/runtime/panic.go:513 +0x1b9
golang.org/x/tools/go/pointer.(*analysis).rtypeTaggedValue(0xc00dc6f180, 0xc00000daa8, 0x1, 0x64)
	/home/dominikh/prj/src/golang.org/x/tools/go/pointer/gen.go:217 +0x1e2
golang.org/x/tools/go/pointer.(*reflectNewConstraint).solve(0xc00d8102b0, 0xc00dc6f180, 0xc00c3f8e00)
	/home/dominikh/prj/src/golang.org/x/tools/go/pointer/reflect.go:1301 +0x152
golang.org/x/tools/go/pointer.(*analysis).solveConstraints(0xc00dc6f180, 0xc0097afc50, 0xc00c3f8e00)
	/home/dominikh/prj/src/golang.org/x/tools/go/pointer/solve.go:165 +0x170
golang.org/x/tools/go/pointer.(*analysis).solve(0xc00dc6f180)
	/home/dominikh/prj/src/golang.org/x/tools/go/pointer/solve.go:59 +0x2e0
golang.org/x/tools/go/pointer.Analyze(0xc00dcd6c30, 0x0, 0x780180, 0xc00d29f950)
	/home/dominikh/prj/src/golang.org/x/tools/go/pointer/analysis.go:331 +0x4ce
main.pta(0xc005bf0000, 0x38, 0x38)
	/tmp/foo.go:47 +0x1c4
main.main()
	/tmp/foo.go:27 +0x200
internal error in pointer analysis: not a *reflect.rtype-tagged object: obj=n55976 tag=*reflect.rtype payload=n55977 (please report this bug)

or issue #27002

I suspect this is caused by two versions of reflect existing (reflect [reflect.test] and reflect) and go/pointer only knowing about one of them.

/cc @alandonovan

@dominikh dominikh added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 17, 2018
@gopherbot gopherbot added this to the Unreleased milestone Aug 17, 2018
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Sep 12, 2019
@adonovan
Copy link
Member

x/tools/go/pointer was deleted; see #59676.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants