Skip to content
New issue

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

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

Already on GitHub? # to your account

go.tools/go.types: goto _ crashes type checker #7537

Closed
griesemer opened this issue Mar 13, 2014 · 1 comment
Closed

go.tools/go.types: goto _ crashes type checker #7537

griesemer opened this issue Mar 13, 2014 · 1 comment
Milestone

Comments

@griesemer
Copy link
Contributor

$ cat y.go
package p

func _() {
_:
    goto _
}

$ gotype y.go 
panic: interface conversion: interface is nil, not *types.Label [recovered]
    panic: interface conversion: interface is nil, not *types.Label [recovered]
    panic: interface conversion: interface is nil, not *types.Label

goroutine 16 [running]:
runtime.panic(0x253c80, 0x208526b40)
    /Users/gri/go/src/pkg/runtime/panic.c:279 +0xf5
main.func·003()
    /Users/gri/golib/src/code.google.com/p/go.tools/cmd/gotype/gotype.go:212 +0xb6
runtime.panic(0x253c80, 0x208526b40)
    /Users/gri/go/src/pkg/runtime/panic.c:248 +0x18d
code.google.com/p/go.tools/go/types.(*checker).handleBailout(0x208536100, 0x208571e08)
    /Users/gri/golib/src/code.google.com/p/go.tools/go/types/check.go:204 +0xdf
runtime.panic(0x253c80, 0x208526b40)
    /Users/gri/go/src/pkg/runtime/panic.c:248 +0x18d
code.google.com/p/go.tools/go/types.func·018(0x22084fa978, 0x2084f0300)
    /Users/gri/golib/src/code.google.com/p/go.tools/go/types/labels.go:222 +0x53e
code.google.com/p/go.tools/go/types.func·018(0x22084fa9b0, 0x2084f0240)
    /Users/gri/golib/src/code.google.com/p/go.tools/go/types/labels.go:167 +0x1120
code.google.com/p/go.tools/go/types.(*checker).blockBranches(0x208536100, 0x208526b00,
0x0, 0x2084f0240, 0x2084e4430, ...)
    /Users/gri/golib/src/code.google.com/p/go.tools/go/types/labels.go:263 +0x2d1
code.google.com/p/go.tools/go/types.(*checker).labels(0x208536100, 0x20850ca20)
    /Users/gri/golib/src/code.google.com/p/go.tools/go/types/labels.go:17 +0x1d3
code.google.com/p/go.tools/go/types.(*checker).funcBody(0x208536100, 0x208516420,
0x2084e43c4, 0x1, 0x20850cb40, ...)
    /Users/gri/golib/src/code.google.com/p/go.tools/go/types/stmt.go:42 +0x1a0
code.google.com/p/go.tools/go/types.(*checker).functionBodies(0x208536100)
    /Users/gri/golib/src/code.google.com/p/go.tools/go/types/resolver.go:369 +0xf6
code.google.com/p/go.tools/go/types.(*checker).Files(0x208536100, 0x208524028, 0x1, 0x1,
0x0, ...)
    /Users/gri/golib/src/code.google.com/p/go.tools/go/types/check.go:219 +0x115
code.google.com/p/go.tools/go/types.(*Config).Check(0x20850ca80, 0x2a1580, 0x3,
0x2085268c0, 0x208524028, ...)
    /Users/gri/golib/src/code.google.com/p/go.tools/go/types/api.go:236 +0xd1
main.checkPkgFiles(0x208524028, 0x1, 0x1)
    /Users/gri/golib/src/code.google.com/p/go.tools/cmd/gotype/gotype.go:217 +0x18a
main.main()
    /Users/gri/golib/src/code.google.com/p/go.tools/cmd/gotype/gotype.go:254 +0x196
@griesemer
Copy link
Contributor Author

Comment 1:

This issue was closed by revision golang/tools@c4ca0e2.

Status changed to Fixed.

@griesemer griesemer self-assigned this Mar 13, 2014
@rsc rsc added this to the Go1.3 milestone Apr 14, 2015
@rsc rsc removed the release-go1.3 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

3 participants