Skip to content

x/net/{ipv4,ipv6}: PacketConn.SetControlMessage panics in reflect #19209

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

Closed
danderson opened this issue Feb 21, 2017 · 1 comment
Closed

x/net/{ipv4,ipv6}: PacketConn.SetControlMessage panics in reflect #19209

danderson opened this issue Feb 21, 2017 · 1 comment

Comments

@danderson
Copy link
Contributor

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version devel +a7e2556 Tue Feb 21 01:05:55 2017 +0000 linux/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/travis/gopath"
GORACE=""
GOROOT="/home/travis/.gimme/versions/go"
GOTOOLDIR="/home/travis/.gimme/versions/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build669925158=/tmp/go-build"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

What did you do?

go get go.universe.tf/netboot/dhcp4
go test go.universe.tf/netboot/dhcp4

The above test passes in 1.6, 1.7 and 1.8, but crashes at tip.

What did you expect to see?

Test passing.

What did you see instead?

panic: reflect: call of reflect.Value.Int on zero Value [recovered]
panic: reflect: call of reflect.Value.Int on zero Value
goroutine 5 [running]:
testing.tRunner.func1(0xc42006c680)
/home/travis/.gimme/versions/go/src/testing/testing.go:624 +0x264
panic(0x57f8a0, 0xc42000cee0)
/home/travis/.gimme/versions/go/src/runtime/panic.go:489 +0x25a
reflect.Value.Int(0x0, 0x0, 0x0, 0x5b3ca6)
/home/travis/.gimme/versions/go/src/reflect/value.go:902 +0xb5
go.universe.tf/netboot/vendor/golang.org/x/net/internal/netreflect.socketOf(0x671920, 0xc42000e0a0, 0xc42000e0a0, 0x671920, 0xc42000e0a0)
/home/travis/gopath/src/go.universe.tf/netboot/vendor/golang.org/x/net/internal/netreflect/socket_posix.go:26 +0x196
go.universe.tf/netboot/vendor/golang.org/x/net/internal/netreflect.PacketSocketOf(0x671680, 0xc42000e0a0, 0xc42000e0a0, 0xc42001e780, 0xc42000e0a0)
/home/travis/gopath/src/go.universe.tf/netboot/vendor/golang.org/x/net/internal/netreflect/socket.go:33 +0x7d
go.universe.tf/netboot/vendor/golang.org/x/net/ipv4.(*PacketConn).SetControlMessage(0xc42001e780, 0x8, 0xc42001e701, 0x6, 0x671680)
/home/travis/gopath/src/go.universe.tf/netboot/vendor/golang.org/x/net/ipv4/endpoint.go:62 +0x5d
go.universe.tf/netboot/dhcp4.newPortableConn(0xbe7d, 0x0, 0x0, 0xb, 0x671680)
/home/travis/gopath/src/go.universe.tf/netboot/dhcp4/conn.go:221 +0x11f
go.universe.tf/netboot/dhcp4.TestPortableConn(0xc42006c680)
/home/travis/gopath/src/go.universe.tf/netboot/dhcp4/conn_test.go:128 +0x175
testing.tRunner(0xc42006c680, 0x5be468)
/home/travis/.gimme/versions/go/src/testing/testing.go:659 +0x98
created by testing.(*T).Run
/home/travis/.gimme/versions/go/src/testing/testing.go:701 +0x2da
FAIL go.universe.tf/netboot/dhcp4 0.006s

I'm working on a smaller reproduction recipe, I'll update the bug when I have one.

@mikioh
Copy link
Contributor

mikioh commented Feb 21, 2017

Yup, dup of #19051.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants