cmd/go: fix 'go vet' of package with external tests

For example, fixes 'go vet syscall', which has source
files in package syscall_test.

Fixes issue 8511.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews, iant
https://codereview.appspot.com/152220044
regexp/syntax: regenerate doc.go from re2 syntax

Generated using re2/doc/mksyntaxgo.

Fixes issue 8505.

LGTM=iant
R=r, iant
CC=golang-codereviews
https://codereview.appspot.com/155890043
encoding/json: document that embedded interfaces look like non-embedded ones

Fixes issue 8386.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews, iant
https://codereview.appspot.com/149570043
net/url: document result of String

Fixes issue 8742.

LGTM=bradfitz
R=golang-codereviews
CC=adg, bradfitz, golang-codereviews, iant
https://codereview.appspot.com/155910043
os: make Process.Signal 'process finished' error consistent on Unix

While we're here, fix the implementation of Release on both
Unix and Windows: Release is supposed to make Signal an error.

While we're here, make sure we never Signal pid 0.
(Don't try this at home.)

Fixes issue 7658.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews, iant
https://codereview.appspot.com/152240043
os: recomment MkdirAll

The internal comments are not completely precise about
what is going on, and they are causing confusion.

Fixes issue 8283.

LGTM=r
R=r
CC=golang-codereviews
https://codereview.appspot.com/151460043
cmd/gc: prohibit short variable declarations containing duplicate symbols

Fixes issue 6764.
Fixes issue 8435.

LGTM=rsc
R=golang-codereviews, r, gobot, rsc
CC=golang-codereviews
https://codereview.appspot.com/116440046

Committer: Russ Cox <rsc@golang.org>
go/build: do not consider "android.go" to be android-specific
A file name must have a non-empty underscore-separated
prefix before its suffix matches GOOS. This is what the
documentation already said but is not what the code did.

Fixes issue 8838.

This needs to be called out in the release notes.
The he single affected file
        code.google.com/p/go.text/collate/tools/colcmp/darwin.go
could use a renaming but works because it has a build tag inside.

LGTM=adg, rsc
R=golang-codereviews, adg, rsc
CC=golang-codereviews
https://codereview.appspot.com/147690043
doc/go1.4.txt: GOOS suffixes require underscores to act as build tags

CC=golang-codereviews
https://codereview.appspot.com/151490043
go/build: update docs for GOOS.go change

Forgotten in https://codereview.appspot.com/147690043/

Update Issue 8838

LGTM=r
R=r
CC=golang-codereviews, rsc
https://codereview.appspot.com/152220045
strings: use fast path for IndexRune

Noticed while reviewing https://codereview.appspot.com/147690043/

I'd never seen anybody use IndexRune before, and
unsurprisingly it doesn't use the other fast paths in the
strings/bytes packages. IndexByte uses assembly.

Also, less code this way.

LGTM=r
R=r
CC=golang-codereviews
https://codereview.appspot.com/147700043
os, syscall: test Chtimes on directories, fix on Windows

Fixes issue 8090.

LGTM=alex.brainman
R=alex.brainman
CC=golang-codereviews
https://codereview.appspot.com/154020043
cmd/ld: ignore .Linfo_stringNN variables in clang .o files

http://build.golang.org/log/c7a91b6eac8f8daa2bd17801be273e58403a15f2

# cmd/pprof
/linux-386-clang-9115aad1dc4a/go/pkg/linux_386/net.a(_all.o): sym#16: ignoring .Linfo_string0 in section 16 (type 0)
/linux-386-clang-9115aad1dc4a/go/pkg/linux_386/net.a(_all.o): sym#17: ignoring .Linfo_string1 in section 16 (type 0)
/linux-386-clang-9115aad1dc4a/go/pkg/linux_386/net.a(_all.o): sym#18: ignoring .Linfo_string2 in section 16 (type 0)
/linux-386-clang-9115aad1dc4a/go/pkg/linux_386/net.a(_all.o): sym#20: ignoring .Linfo_string0 in section 16 (type 0)
/linux-386-clang-9115aad1dc4a/go/pkg/linux_386/net.a(_all.o): sym#21: ignoring .Linfo_string1 in section 16 (type 0)
...

I don't know what these are. Let's ignore them and see if we get any further.

TBR=iant
CC=golang-codereviews
https://codereview.appspot.com/155030043
doc/go1.4.txt: useless change to tickle builders

Debugging the builders and need a commit to make them run.

R=adg
CC=golang-codereviews
https://codereview.appspot.com/149600043
net/http: fix authentication info leakage in Referer header (potential security risk)

http.Client calls URL.String() to fill in the Referer header, which may
contain authentication info. This patch removes authentication info from
the Referer header without introducing any API changes.

A new test for net/http is also provided.

This is the polished version of Alberto García Hierro's
https://codereview.appspot.com/9766046/

It should handle https Referer right.

Fixes issue 8417

LGTM=bradfitz
R=golang-codereviews, gobot, bradfitz, mikioh.mikioh
CC=golang-codereviews
https://codereview.appspot.com/151430043

Committer: Brad Fitzpatrick <bradfitz@golang.org>
runtime: remove type-punning for Type.gc[0], gc[1]

Depending on flags&KindGCProg,
gc[0] and gc[1] are either pointers or inlined bitmap bits.
That's not compatible with a precise garbage collector:
it needs to be always pointers or never pointers.

Change the inlined bitmap case to store a pointer to an
out-of-line bitmap in gc[0]. The out-of-line bitmaps are
dedup'ed, so that for example all pointer types share the
same out-of-line bitmap.

Fixes issue 8864.

LGTM=r
R=golang-codereviews, dvyukov, r
CC=golang-codereviews, iant, khr, rlh
https://codereview.appspot.com/155820043
encoding/json: fix handling of null with ,string fields

Fixes issue 8587.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews, iant, r
https://codereview.appspot.com/152270044
runtime: crash if we see an invalid pointer into GC arena

This will help find bugs during the release freeze.
It's not clear it should be kept for the release itself.
That's issue 8861.

The most likely thing that would trigger this is stale
pointers that previously were ignored or caused memory
leaks. These were allowed due to the use of conservative
collection. Now that everything is precise, we should not
see them anymore.

The small number check reinforces what the stack copier
is already doing, catching the storage of integers in pointers.
It caught issue 8864.

The check is disabled if _cgo_allocate is linked into the binary,
which is to say if the binary is using SWIG to allocate untyped
Go memory. In that case, there are invalid pointers and there's
nothing we can do about it.

LGTM=rlh
R=golang-codereviews, dvyukov, rlh
CC=golang-codereviews, iant, khr, r
https://codereview.appspot.com/148470043
cmd/gc: fix print format

Fixes 386 build.

TBR=r
CC=golang-codereviews
https://codereview.appspot.com/149620043
cmd/5c, cmd/6c, cmd/8c: make failure to optimize fatal

LGTM=bradfitz, dave, r
R=r, bradfitz, dave
CC=golang-codereviews
https://codereview.appspot.com/152250044