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

cmd/vet: can't handle recursive struct types #6309

dgryski opened this issue Sep 3, 2013 · 3 comments

cmd/vet: can't handle recursive struct types #6309

dgryski opened this issue Sep 3, 2013 · 3 comments


Copy link

@dgryski dgryski commented Sep 3, 2013

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  If a newer version of Go exists,
install it and retry what you did to reproduce the problem.


What steps will reproduce the problem?
If possible, include a link to a program on
1. mkdir hang && curl -o hang/h.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)?

Which operating system are you using?

Which version are you using?  (run 'go version')
1.1.2, but the vet binary was built from an up-to-date repo
Copy link

@adg adg commented Sep 3, 2013

Comment 1:

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, ...) +0xa79 fp=0x2212209188
main.(*File).matchStructArgType(0x2106a9300, 0xe, 0x2106ac000, 0x60ebe8, 0x2106bc160,
...) +0xc0 fp=0x22122091d0

Labels changed: added priority-soon, removed priority-triage.

Owner changed to @griesemer.

Status changed to Accepted.

Copy link

@griesemer griesemer commented Sep 11, 2013

Comment 2:

This is not a bug in go/types but cmd/vet. I cannot deal with recursive structs.

Owner changed to @robpike.

Copy link

@robpike robpike commented Sep 18, 2013

Comment 3:

This issue was closed by revision golang/tools@6ad0d28.

Status changed to Fixed.

@dgryski dgryski added fixed labels Sep 18, 2013
@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants