Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/vet: can't handle recursive struct types #6309
Before filing a bug, please check whether it has been fixed since the latest release. Search the issue tracker and check that you're running the latest version of Go: Run "go version" and compare against http://golang.org/doc/devel/release.html If a newer version of Go exists, install it and retry what you did to reproduce the problem. Thanks. What steps will reproduce the problem? If possible, include a link to a program on play.golang.org. 1. mkdir hang && curl -o hang/h.go http://play.golang.org/p/3cqUaN1ksC.go 2. vet hang What is the expected output? vet reports something or nothing, but exits eventually. What do you see instead? vet enters an infinite loop and never exits, sucking 100% of the CPU hich compiler are you using (5g, 6g, 8g, gccgo)? 6g Which operating system are you using? linux Which version are you using? (run 'go version') 1.1.2, but the vet binary was built from an up-to-date go.tools/cmd/vet repo
I can reproduce the issue. The type checker gets stuck in a loop between matchArgType and matchStructArgType: main.(*File).matchArgType(0x2106a9300, 0xe, 0x60ee30, 0x21065eab0, 0x60ebe8, ...) code.google.com/p/go.tools/cmd/vet/types.go:149 +0xa79 fp=0x2212209188 main.(*File).matchStructArgType(0x2106a9300, 0xe, 0x2106ac000, 0x60ebe8, 0x2106bc160, ...) code.google.com/p/go.tools/cmd/vet/types.go:225 +0xc0 fp=0x22122091d0
Labels changed: added priority-soon, removed priority-triage.
Owner changed to @griesemer.
Status changed to Accepted.
This issue was closed.