commit | 0a2a64d85d52ad51de34d39bc5685c39c0e1e32a | [log] [tgz] |
---|---|---|
author | Emmanuel Odeke <emm.odeke@gmail.com> | Sun Jul 17 14:22:15 2016 -0700 |
committer | Rob Pike <r@golang.org> | Fri Aug 19 21:54:39 2016 +0000 |
tree | c42b4fe4ab44670f006550aaa27a4aff52910eee | |
parent | 14e59511661303ab1406f7c21ee27e58bcd0750e [diff] |
encoding/gob: error out instead of panicking on nil dereference 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>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
For documentation about how to install and use Go, visit https://golang.org/ or load doc/install-source.html in your web browser.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Go is the work of hundreds of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
If you have just untarred a binary Go distribution, you need to set the environment variable $GOROOT to the full path of the go directory (the one containing this file). You can omit the variable if you unpack it into /usr/local/go, or if you rebuild from sources by running all.bash (see doc/install-source.html). You should also add the Go binary directory $GOROOT/bin to your shell's path.
For example, if you extracted the tar file into $HOME/go, you might put the following in your .profile:
export GOROOT=$HOME/go export PATH=$PATH:$GOROOT/bin
See https://golang.org/doc/install or doc/install.html for more details.