mirror of
https://github.com/golang/go
synced 2024-09-30 19:28:32 -06:00
0a2a64d85d
Do not panic when we encounter nil interface values which are invalid values for gob. Previously this wasn't caught yet we were calling reflect.*.Type() on reflect.Invalid values thereby causing panic: `panic: reflect: call of reflect.Value.Type on zero Value.` which is a panic not enforced by encoding/gob itself. We can catch this and send back an error to the caller. Fixes #16204 Change-Id: Ie646796db297759a74a02eee5267713adbe0c3a0 Reviewed-on: https://go-review.googlesource.com/24989 Reviewed-by: Rob Pike <r@golang.org> Run-TryBot: Rob Pike <r@golang.org> |
||
---|---|---|
.. | ||
codec_test.go | ||
debug.go | ||
dec_helpers.go | ||
decgen.go | ||
decode.go | ||
decoder.go | ||
doc.go | ||
dump.go | ||
enc_helpers.go | ||
encgen.go | ||
encode.go | ||
encoder_test.go | ||
encoder.go | ||
error.go | ||
example_encdec_test.go | ||
example_interface_test.go | ||
example_test.go | ||
gobencdec_test.go | ||
timing_test.go | ||
type_test.go | ||
type.go |