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

Closed
dgryski opened this issue Sep 3, 2013 · 3 comments

Comments

Projects
None yet
5 participants
@dgryski
Copy link
Contributor

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
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
@adg

This comment has been minimized.

Copy link
Contributor

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, ...)
    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.

@griesemer

This comment has been minimized.

Copy link
Contributor

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.

@robpike

This comment has been minimized.

Copy link
Contributor

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.
You can’t perform that action at this time.