mwhudson@glamdring:~$ go version
go version devel +0acecb7 Wed Jul 22 20:27:24 2015 +0000 linux/amd64
mwhudson@glamdring:~$ go test -v github.com/matttproud/golang_protobuf_extensions/pbutil
=== RUN TestWriteDelimited
--- PASS: TestWriteDelimited (0.00s)
=== RUN TestReadDelimited
--- PASS: TestReadDelimited (0.00s)
=== RUN TestEndToEndValid
--- PASS: TestEndToEndValid (0.00s)
=== RUN TestFuzz
--- FAIL: TestFuzz (0.00s)
panic: reflect: call of reflect.Value.NumField on zero Value [recovered]
panic: reflect: call of reflect.Value.NumField on zero Value
goroutine 8 [running]:
testing.tRunner.func1(0xc8200a21b0)
/opt/opensource/go/src/testing/testing.go:450 +0x171
reflect.flag.mustBe(0x0, 0x19)
/opt/opensource/go/src/reflect/value.go:199 +0xa6
reflect.Value.NumField(0x0, 0x0, 0x0, 0x0)
/opt/opensource/go/src/reflect/value.go:1146 +0x2a
github.com/matttproud/golang_protobuf_extensions/pbtest.sanitizeGenerated(0x7f92a0ca6ee8, 0x0, 0x1, 0x0, 0x0)
/opt/opensource/gopath/src/github.com/matttproud/golang_protobuf_extensions/pbtest/quick.go:53 +0x2f8
github.com/matttproud/golang_protobuf_extensions/pbtest.sanitizeGenerated(0x7f92a0ca6e40, 0xc820033b00, 0x0, 0x0, 0x0)
/opt/opensource/gopath/src/github.com/matttproud/golang_protobuf_extensions/pbtest/quick.go:64 +0x83e
github.com/matttproud/golang_protobuf_extensions/pbtest.SanitizeGenerated(0x7f92a0ca6e40, 0xc820033b00, 0x0, 0x0)
/opt/opensource/gopath/src/github.com/matttproud/golang_protobuf_extensions/pbtest/quick.go:33 +0x40
github.com/matttproud/golang_protobuf_extensions/pbutil.rndMessage(0xc820011240, 0x0, 0x0)
/opt/opensource/gopath/src/github.com/matttproud/golang_protobuf_extensions/pbutil/all_test.go:273 +0x3bd
github.com/matttproud/golang_protobuf_extensions/pbutil.rndMessages(0xc820011240, 0x0, 0x0, 0x0)
/opt/opensource/gopath/src/github.com/matttproud/golang_protobuf_extensions/pbutil/all_test.go:284 +0xb7
github.com/matttproud/golang_protobuf_extensions/pbutil.TestFuzz.func1(0x0)
/opt/opensource/gopath/src/github.com/matttproud/golang_protobuf_extensions/pbutil/all_test.go:292 +0x4a
reflect.Value.call(0x587e40, 0xc82000a9a0, 0x13, 0x60dca8, 0x4, 0x749988, 0x0, 0x0, 0x0, 0x0, ...)
/opt/opensource/go/src/reflect/value.go:432 +0x120a
reflect.Value.Call(0x587e40, 0xc82000a9a0, 0x13, 0x749988, 0x0, 0x0, 0x0, 0x0, 0x0)
/opt/opensource/go/src/reflect/value.go:300 +0xb1
testing/quick.Check(0x587e40, 0xc82000a9a0, 0x725e60, 0x0, 0x0)
/opt/opensource/go/src/testing/quick/quick.go:270 +0x421
github.com/matttproud/golang_protobuf_extensions/pbutil.TestFuzz(0xc8200a21b0)
/opt/opensource/gopath/src/github.com/matttproud/golang_protobuf_extensions/pbutil/all_test.go:317 +0x102
testing.tRunner(0xc8200a21b0, 0x723248)
/opt/opensource/go/src/testing/testing.go:456 +0x98
created by testing.RunTests
/opt/opensource/go/src/testing/testing.go:561 +0x86d
goroutine 1 [chan receive]:
testing.RunTests(0x66f140, 0x723200, 0x4, 0x4, 0x40ec01)
/opt/opensource/go/src/testing/testing.go:562 +0x8ad
testing.(*M).Run(0xc820043ef8, 0x1b)
/opt/opensource/go/src/testing/testing.go:494 +0x70
main.main()
github.com/matttproud/golang_protobuf_extensions/pbutil/_test/_testmain.go:60 +0x116
exit status 2
FAIL github.com/matttproud/golang_protobuf_extensions/pbutil 0.006s
mwhudson@glamdring:~$
I haven't checked but I'm 99% certain this is because testing/quick.Value can return a nil pointer now (see very bottom of http://tip.golang.org/doc/go1.5).