-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Closed
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.
Milestone
Description
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
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.