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: crashes on "C.f(*p(**q))" #14201

Closed
mwhudson opened this issue Feb 2, 2016 · 1 comment

Comments

Projects
None yet
3 participants
@mwhudson
Copy link
Contributor

commented Feb 2, 2016

I presume this is from https://go-review.googlesource.com/#/c/17041/ ? (@ianlancetaylor?)

mwhudson@aeglos:go-test-cases$ go build vet.go
# command-line-arguments
./vet.go:3: undefined: C in C.f
./vet.go:3: undefined: p
mwhudson@aeglos:go-test-cases$ cat vet.go 
package p

var _ = C.f(*p(**p))

mwhudson@aeglos:go-test-cases$ go vet vet.go
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x28 pc=0x40b5a3]

goroutine 1 [running]:
main.cgoBaseType(0xc8200ba000, 0x7f4a7608ec58, 0xc8200b2640, 0x0, 0x0)
    /opt/opensource/go/src/cmd/vet/cgo.go:75 +0x2d3
main.checkCgoCall(0xc8200ba000, 0x7f4a7608e930, 0xc8200134c0)
    /opt/opensource/go/src/cmd/vet/cgo.go:42 +0x1ad
main.(*File).Visit(0xc8200ba000, 0x7f4a7608e930, 0xc8200134c0, 0x0, 0x0)
    /opt/opensource/go/src/cmd/vet/main.go:485 +0x1ba
go/ast.Walk(0x7f4a7608efd0, 0xc8200ba000, 0x7f4a7608e930, 0xc8200134c0)
    /opt/opensource/go/src/go/ast/walk.go:52 +0x56
go/ast.walkExprList(0x7f4a7608efd0, 0xc8200ba000, 0xc8200b42e0, 0x1, 0x1)
    /opt/opensource/go/src/go/ast/walk.go:26 +0xd5
go/ast.Walk(0x7f4a7608efd0, 0xc8200ba000, 0x7f4a7608f028, 0xc8200b1bd0)
    /opt/opensource/go/src/go/ast/walk.go:308 +0xf63
go/ast.Walk(0x7f4a7608efd0, 0xc8200ba000, 0x7f4a7608ea50, 0xc820013500)
    /opt/opensource/go/src/go/ast/walk.go:331 +0x1f7d
go/ast.walkDeclList(0x7f4a7608efd0, 0xc8200ba000, 0xc8200b4310, 0x1, 0x1)
    /opt/opensource/go/src/go/ast/walk.go:38 +0xd5
go/ast.Walk(0x7f4a7608efd0, 0xc8200ba000, 0x7f4a7608ed70, 0xc82008e600)
    /opt/opensource/go/src/go/ast/walk.go:353 +0x29b9
main.(*File).walkFile(0xc8200ba000, 0x7ffd3bd0fdef, 0x6, 0xc82008e600)
    /opt/opensource/go/src/cmd/vet/main.go:454 +0x1f5
main.doPackage(0x7a0398, 0x1, 0xc82000a650, 0x1, 0x1, 0x0)
    /opt/opensource/go/src/cmd/vet/main.go:353 +0xd97
main.main()
    /opt/opensource/go/src/cmd/vet/main.go:243 +0x420
exit status 2

@ianlancetaylor ianlancetaylor added this to the Go1.6Maybe milestone Feb 2, 2016

@ianlancetaylor ianlancetaylor self-assigned this Feb 2, 2016

@gopherbot

This comment has been minimized.

Copy link

commented Feb 2, 2016

CL https://golang.org/cl/19174 mentions this issue.

@gopherbot gopherbot closed this in 182a9db Feb 3, 2016

@golang golang locked and limited conversation to collaborators Feb 3, 2017

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.