1
0
mirror of https://github.com/golang/go synced 2024-11-18 19:04:40 -07:00
The Go programming language
Go to file
Alan Donovan 5cbf2abd36 go.tools/ssa: ensure address-deriving operations panic on nil inputs.
&x.f, &x[0], x[i:j], &*x all must panic if x==nil.

The first three are already addressed by the semantics of
FieldAddr, IndexAddr, Slice; updated docs to reflect this.
The final case requires generation of an additional dynamic check.

See golang.org/s/go12nil for details.

Tested on $GOROOT/test/nilptr2.go (with patch from CL 13108043)

Also: remove a TODO where a no-op will do.

R=gri, crawshaw
CC=golang-dev, rsc
https://golang.org/cl/13064044
2013-08-19 17:51:33 -04:00
cmd undo CL 12811043 / 44387735a77d 2013-08-19 11:12:44 +10:00
dashboard go.tools: add dashboard 2013-08-01 13:23:51 +10:00
go go.tools/go/vcs: do not delete $TMPDIR during test runs 2013-08-19 16:22:31 +10:00
godoc cmd/godoc: bake templates and scripts into godoc binary 2013-08-16 11:44:27 +10:00
gotype go.tools/gotype: fix build 2013-07-19 07:52:43 -07:00
importer go.tools/importer: retain scope information. 2013-08-19 15:14:13 -04:00
ssa go.tools/ssa: ensure address-deriving operations panic on nil inputs. 2013-08-19 17:51:33 -04:00
.hgignore go.empty: prototype for new subrepository 2012-01-25 14:45:13 -05:00
AUTHORS go.empty: prototype for new subrepository 2012-01-25 14:45:13 -05:00
codereview.cfg go.empty: prototype for new subrepository 2012-01-25 14:45:13 -05:00
CONTRIBUTORS go.empty: prototype for new subrepository 2012-01-25 14:45:13 -05:00
LICENSE LICENSE: add 2012-03-17 15:20:58 +11:00
PATENTS go.empty: add PATENTS file to the subrepo. 2012-04-16 11:24:04 +10:00
README go.tools: provide the right README 2013-05-17 12:55:10 -07:00

This subrepository holds the source for various packages and tools that support
the Go programming language.

Although at least some of the tools themselves will be included in binary Go distributions,
the packages from which they are built are of little interest to most Go programmers.

To submit changes to this repository, see http://golang.org/doc/contribute.html.