]> Cypherpunks.ru repositories - gostls13.git/log
gostls13.git
6 years ago[release-branch.go1.8] go1.8.4 go1.8.4
Chris Broadfoot [Wed, 4 Oct 2017 18:38:15 +0000 (11:38 -0700)]
[release-branch.go1.8] go1.8.4

Change-Id: Iae6c1ccd1e42656fa5a57d6367e43085143cd590
Reviewed-on: https://go-review.googlesource.com/68234
Reviewed-by: Russ Cox <rsc@golang.org>
6 years ago[release-branch.go1.8] net/smtp: fix PlainAuth to refuse to send passwords to non...
Russ Cox [Wed, 4 Oct 2017 17:24:49 +0000 (13:24 -0400)]
[release-branch.go1.8] net/smtp: fix PlainAuth to refuse to send passwords to non-TLS servers

PlainAuth originally refused to send passwords to non-TLS servers
and was documented as such.

In 2013, issue #5184 was filed objecting to the TLS requirement,
despite the fact that it is spelled out clearly in RFC 4954.
The only possibly legitimate use case raised was using PLAIN auth
for connections to localhost, and the suggested fix was to let the
server decide: if it advertises that PLAIN auth is OK, believe it.
That approach was adopted in CL 8279043 and released in Go 1.1.

Unfortunately, this is exactly wrong. The whole point of the TLS
requirement is to make sure not to send the password to the wrong
server or to a man-in-the-middle. Instead of implementing this rule,
CL 8279043 blindly trusts the server, so that if a man-in-the-middle
says "it's OK, you can send me your password," PlainAuth does.
And the documentation was not updated to reflect any of this.

This CL restores the original TLS check, as required by RFC 4954
and as promised in the documentation for PlainAuth.
It then carves out a documented exception for connections made
to localhost (defined as "localhost", "127.0.0.1", or "::1").

Cherry-pick of CL 68170.

Change-Id: I1d3729bbd33aa2f11a03f4c000e6bb473164957b
Reviewed-on: https://go-review.googlesource.com/68023
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
6 years ago[release-branch.go1.8] cmd/go: reject update of VCS inside VCS
Russ Cox [Fri, 22 Sep 2017 16:17:21 +0000 (12:17 -0400)]
[release-branch.go1.8] cmd/go: reject update of VCS inside VCS

Cherry-pick of CL 68110.

Change-Id: Iae84c6404ab5eeb6950faa2364f97a017c67c506
Reviewed-on: https://go-review.googlesource.com/68190
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
6 years ago[release-branch.go1.8] runtime: deflake TestPeriodicGC
Russ Cox [Wed, 4 Oct 2017 16:28:20 +0000 (12:28 -0400)]
[release-branch.go1.8] runtime: deflake TestPeriodicGC

It was only waiting 0.1 seconds for the two GCs it wanted.
Let it wait 1 second.

Change-Id: Ib3cdc8127cbf95694a9f173643c02529a85063af
Reviewed-on: https://go-review.googlesource.com/68150
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
6 years ago[release-branch.go1.8] os: skip TestNetworkSymbolicLink if Server service is not...
Alex Brainman [Sun, 30 Apr 2017 05:51:55 +0000 (15:51 +1000)]
[release-branch.go1.8] os: skip TestNetworkSymbolicLink if Server service is not started

Fixes #20179

Change-Id: I2b405c9a212a75aae628ad51885616d33c054191
Reviewed-on: https://go-review.googlesource.com/42190
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/68030
Run-TryBot: Chris Broadfoot <cbro@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
7 years ago[release-branch.go1.8] doc: update bootstrap archive URL
Chris Broadfoot [Wed, 31 May 2017 18:20:16 +0000 (11:20 -0700)]
[release-branch.go1.8] doc: update bootstrap archive URL

This includes the patch for systems that build PIE executables by
defaul

Updates #20276.

Change-Id: Iecf8dfcf11bc18d397b8075559c37e3610f825cb
Reviewed-on: https://go-review.googlesource.com/44470
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-on: https://go-review.googlesource.com/44491
Reviewed-by: Chris Broadfoot <cbro@golang.org>
7 years ago[release-branch.go1.8] go1.8.3 go1.8.3
Chris Broadfoot [Wed, 24 May 2017 18:13:24 +0000 (11:13 -0700)]
[release-branch.go1.8] go1.8.3

Change-Id: I048f21f8ca68758fdd7ac875f7db5e4ed1930f3b
Reviewed-on: https://go-review.googlesource.com/44037
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
7 years ago[release-branch.go1.8] doc: document go1.8.3
Chris Broadfoot [Wed, 24 May 2017 18:05:04 +0000 (11:05 -0700)]
[release-branch.go1.8] doc: document go1.8.3

Change-Id: I5d55c3b1011dd10552d8e740fb65886306d91b5c
Reviewed-on: https://go-review.googlesource.com/44035
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-on: https://go-review.googlesource.com/44036

7 years ago[release-branch.go1.8] cmd/compile: don't move spills to loop exits where the spill...
Keith Randall [Wed, 24 May 2017 05:55:59 +0000 (22:55 -0700)]
[release-branch.go1.8] cmd/compile: don't move spills to loop exits where the spill is dead

We shouldn't move a spill to a loop exit where the spill itself
is dead.  The stack location assigned to the spill might already
be reused by another spill at this point.

The case we previously handled incorrectly is the one where the value
being spilled is still live, but the spill itself is dead.

Fixes #20472

Patching directly on the release branch because the spill moving code has
already been rewritten for 1.9. (And it doesn't have this bug.)

Change-Id: I26c5273dafd98d66ec448750073c2b354ef89ad6
Reviewed-on: https://go-review.googlesource.com/44033
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
7 years ago[release-branch.go1.8] cmd/compile: zero ambiguously live variables at VARKILLs
Keith Randall [Tue, 23 May 2017 22:19:27 +0000 (15:19 -0700)]
[release-branch.go1.8] cmd/compile: zero ambiguously live variables at VARKILLs

This is a redo of CL 41076 backported to the 1.8 release branch.
There were major conflicts, so I had to basically rewrite it again
from scratch.  The way Progs are allocated changed.  Liveness analysis
and Prog generation got reordered.  Liveness analysis changed from
running on gc.BasicBlock to ssa.Block.  All that makes the logic quite
a bit different.

Please review carefully.

From CL 41076:

At VARKILLs, zero a variable if it is ambiguously live.
After the VARKILL anything this variable references
might be collected. If it were to become live again later,
the GC will see references to already-collected objects.

We don't know a variable is ambiguously live until very
late in compilation (after lowering, register allocation, ...),
so it is hard to generate the code in an arch-independent way.
We also have to be careful not to clobber any registers.
Fortunately, this almost never happens so performance is ~irrelevant.

There are only 2 instances where this triggers in the stdlib.

Fixes #20029

Change-Id: Ibb757eec58ee07f40df5e561b19d315684dc4bda
Reviewed-on: https://go-review.googlesource.com/43998
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
7 years ago[release-branch.go1.8] runtime: use pselect6 for usleep on linux/386
Austin Clements [Tue, 23 May 2017 21:54:24 +0000 (17:54 -0400)]
[release-branch.go1.8] runtime: use pselect6 for usleep on linux/386

Commit 4dcba023c6 replaced select with pselect6 on linux/amd64 and
linux/arm, but it turns out the Android emulator uses linux/386. This
makes the equivalent change there, too.

Fixes #20409 more.

Change-Id: If542d6ade06309aab8758d5f5f6edec201ca7670
Reviewed-on: https://go-review.googlesource.com/44011
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit ecad34a40ea390ddf5ba2da8f3c3f2c5f15297c8)
Reviewed-on: https://go-review.googlesource.com/44002
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
7 years ago[release-branch.go1.8] runtime: use pselect6 for usleep on linux/amd64 and linux/arm
Austin Clements [Thu, 18 May 2017 20:56:48 +0000 (16:56 -0400)]
[release-branch.go1.8] runtime: use pselect6 for usleep on linux/amd64 and linux/arm

Android O black-lists the select system call because its libc, Bionic,
does not use this system call. Replace our use of select with pselect6
(which is allowed) on the platforms that support targeting Android.
linux/arm64 already uses pselect6 because there is no select on arm64,
so only linux/amd64 and linux/arm need changing. pselect6 has been
available since Linux 2.6.16, which is before Go's minimum
requirement.

Fixes #20409.

Change-Id: Ic526b5b259a9e01d2f145a1f4d2e76e8c49ce809
Reviewed-on: https://go-review.googlesource.com/43641
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit 4dcba023c62d7f7968abc54fa5d38d2bf11412ba)
Reviewed-on: https://go-review.googlesource.com/44001
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
7 years ago[release-branch.go1.8] cmd/compile: ignore types when considering tuple select for CSE
Todd Neal [Mon, 24 Apr 2017 15:20:09 +0000 (11:20 -0400)]
[release-branch.go1.8] cmd/compile: ignore types when considering tuple select for CSE

Fixes #20097

Change-Id: I3c9626ccc8cd0c46a7081ea8650b2ff07a5d4fcd
Reviewed-on: https://go-review.googlesource.com/41505
Run-TryBot: Todd Neal <todd@tneal.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-on: https://go-review.googlesource.com/43997
Run-TryBot: Chris Broadfoot <cbro@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
7 years ago[release-branch.go1.8] net/http: update bundled http2 for gracefulShutdownCh lock...
Brad Fitzpatrick [Tue, 23 May 2017 20:12:26 +0000 (20:12 +0000)]
[release-branch.go1.8] net/http: update bundled http2 for gracefulShutdownCh lock contention slowdown

This updates the bundled x/net/http2 repo to git rev 186fd3fc (from
the net repo's release-branch.go1.8) for:

    [release-branch.go1.8] http2: fix lock contention slowdown due to gracefulShutdownCh
    https://golang.org/cl/43459

Fixes #20302

Change-Id: Ia01a44c6749292de9c16ca330bdebe1e52458b18
Reviewed-on: https://go-review.googlesource.com/43996
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

7 years ago[release-branch.go1.8] cmd/compile: fix s390x unsigned comparison constant merging...
Michael Munday [Mon, 17 Apr 2017 16:29:32 +0000 (12:29 -0400)]
[release-branch.go1.8] cmd/compile: fix s390x unsigned comparison constant merging rules

On s390x unsigned integer comparisons with immediates require the immediate
to be an unsigned 32-bit integer. The rule was checking that the immediate
was a signed 32-bit integer.

This CL also adds a test for comparisons that could be turned into compare
with immediate or equivalent instructions (depending on architecture and
optimizations applied).

Cherry-pick of CL 40433 and CL 40873.

Fixes #19940.

Reviewed-on: https://go-review.googlesource.com/40931
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

Change-Id: I3daaeaa40d7637bd4421e6b8d37ea4ffd74448ce
Reviewed-on: https://go-review.googlesource.com/43994
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
7 years ago[release-branch.go1.8] cmd/go: if we get a C compiler dwarf2 warning, try without -g
Brad Fitzpatrick [Wed, 3 May 2017 17:50:19 +0000 (17:50 +0000)]
[release-branch.go1.8] cmd/go: if we get a C compiler dwarf2 warning, try without -g

Backport of CL 38072

Fixes #14705

Reviewed-on: https://go-review.googlesource.com/42500
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Change-Id: Ia6ce2a41434aef2f8745a6a862ea66608b1e25f7
Reviewed-on: https://go-review.googlesource.com/43995
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
7 years ago[release-branch.go1.8] runtime: don't corrupt arena bounds on low mmap
Austin Clements [Mon, 22 May 2017 19:53:49 +0000 (15:53 -0400)]
[release-branch.go1.8] runtime: don't corrupt arena bounds on low mmap

Cherry-pick of CL 43870.

If mheap.sysAlloc doesn't have room in the heap arena for an
allocation, it will attempt to map more address space with sysReserve.
sysReserve is given a hint, but can return any unused address range.
Currently, mheap.sysAlloc incorrectly assumes the returned region will
never fall between arena_start and arena_used. If it does,
mheap.sysAlloc will blindly accept the new region as the new
arena_used and arena_end, causing these to decrease and make it so any
Go heap above the new arena_used is no longer considered part of the
Go heap. This assumption *used to be* safe because we had all memory
between arena_start and arena_used mapped, but when we switched to an
arena_start of 0 on 32-bit, it became no longer safe.

Most likely, we've only recently seen this bug occur because we
usually start arena_used just above the binary, which is low in the
address space. Hence, the kernel is very unlikely to give us a region
before arena_used.

Since mheap.sysAlloc is a linear allocator, there's not much we can do
to handle this well. Hence, we fix this problem by simply rejecting
the new region if it isn't after arena_end. In this case, we'll take
the fall-back path and mmap a small region at any address just for the
requested memory.

Fixes #20259.

Change-Id: Ib72e8cd621545002d595c7cade1e817cfe3e5b1e
Reviewed-on: https://go-review.googlesource.com/43954
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
7 years ago[release-branch.go1.8] cmd/compile: fix store chain in schedule pass
Keith Randall [Thu, 11 May 2017 21:46:49 +0000 (14:46 -0700)]
[release-branch.go1.8] cmd/compile: fix store chain in schedule pass

Cherry-pick of CL 43294.

Tuple ops are weird. They are essentially a pair of ops,
one which consumes a mem and one which generates a mem (the Select1).
The schedule pass didn't handle these quite right.

Fix the scheduler to include both parts of the paired op in
the store chain. That makes sure that loads are correctly ordered
with respect to the first of the pair.

Add a check for the ssacheck builder, that there is only one
live store at a time. I thought we already had such a check, but
apparently not...

Fixes #20335

Change-Id: I59eb3446a329100af38d22820b1ca2190ca46a78
Reviewed-on: https://go-review.googlesource.com/43411
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
7 years ago[release-branch.go1.8] runtime: doubly fix "double wakeup" panic
Austin Clements [Thu, 11 May 2017 19:28:39 +0000 (15:28 -0400)]
[release-branch.go1.8] runtime: doubly fix "double wakeup" panic

Cherry-pick of CL 43311.

runtime.gchelper depends on the non-atomic load of work.ndone
happening strictly before the atomic add of work.nwait. Until very
recently (commit 978af9c2db, fixing #20334), the compiler reordered
these operations. This created a race since work.ndone can change as
soon as work.nwait is equal to work.ndone. If that happened, more than
one gchelper could attempt to wake up the work.alldone note, causing a
"double wakeup" panic.

This was fixed in the compiler, but to make this code less subtle,
make the load of work.ndone atomic. This clearly forces the order of
these operations, ensuring the race doesn't happen.

Fixes #19305 (though really 978af9c2db fixed it).

Change-Id: Ieb1a84e1e5044c33ac612c8a5ab6297e7db4c57d
Reviewed-on: https://go-review.googlesource.com/43412
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
7 years ago[release-branch.go1.8] database/sql: ensure releaseConn is defined before a possible...
Daniel Theophanes [Wed, 3 May 2017 15:57:05 +0000 (08:57 -0700)]
[release-branch.go1.8] database/sql: ensure releaseConn is defined before a possible close

Applies https://golang.org/cl/42139 to the go1.8 release branch.

Also correct two minor issues detected with go vet.

Fixes #20217

Change-Id: I2c41af9497493598fbcfc140439b4e25b9bb7e72
Reviewed-on: https://go-review.googlesource.com/42532
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
7 years ago[release-branch.go1.8] runtime: print debug info on "base out of range"
Austin Clements [Thu, 11 May 2017 19:22:10 +0000 (15:22 -0400)]
[release-branch.go1.8] runtime: print debug info on "base out of range"

Cherry-pick of CL 43310.

This adds debugging information when we panic with "heapBitsForSpan:
base out of range".

Updates #20259.

Change-Id: I0dc1a106aa9e9531051c7d08867ace5ef230eb3f
Reviewed-on: https://go-review.googlesource.com/43410
Run-TryBot: Austin Clements <austin@google.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
7 years ago[release-branch.go1.8] doc: remove mentions of yacc tool
Brad Fitzpatrick [Fri, 19 May 2017 19:39:20 +0000 (19:39 +0000)]
[release-branch.go1.8] doc: remove mentions of yacc tool

It was removed in CL 27325.

Fixes #20431

Change-Id: I6842851444186e19029d040f61fdf4f87a3103a6
Reviewed-on: https://go-review.googlesource.com/43771
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit deebd8fe273df2de2d590ee41ae1155c521219e9)
Reviewed-on: https://go-review.googlesource.com/43772
Reviewed-by: Chris Broadfoot <cbro@golang.org>
7 years ago[release-branch.go1.8] go1.8.2 go1.8.2
Chris Broadfoot [Tue, 23 May 2017 17:47:02 +0000 (10:47 -0700)]
[release-branch.go1.8] go1.8.2

Change-Id: Ib04878cbfbb0c09fbd0cc614df314c835e9a6eb0
Reviewed-on: https://go-review.googlesource.com/43991
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
7 years ago[release-branch.go1.8] doc: document go1.8.2 and go1.7.6
Chris Broadfoot [Tue, 23 May 2017 17:36:28 +0000 (10:36 -0700)]
[release-branch.go1.8] doc: document go1.8.2 and go1.7.6

Change-Id: I2ed2e8c4890a65288cf3066ebe3c1d9a16fb4c05
Reviewed-on: https://go-review.googlesource.com/43990
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-on: https://go-review.googlesource.com/43993
Reviewed-by: Chris Broadfoot <cbro@golang.org>
7 years ago[release-branch.go1.8] crypto/elliptic: fix carry bug in x86-64 P-256 implementation.
Adam Langley [Wed, 19 Apr 2017 17:00:32 +0000 (10:00 -0700)]
[release-branch.go1.8] crypto/elliptic: fix carry bug in x86-64 P-256 implementation.

Patch from Vlad Krasnov and confirmed to be under CLA.

Fixes #20040.

Change-Id: Ieb8436c4dcb6669a1620f1e0d257efd047b1b87c
Reviewed-on: https://go-review.googlesource.com/41070
Run-TryBot: Adam Langley <agl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit 9294fa2749ffee7edbbb817a0ef9fe633136fa9c)
Reviewed-on: https://go-review.googlesource.com/43770
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
7 years ago[release-branch.go1.8] doc: document go1.8.1
Chris Broadfoot [Fri, 7 Apr 2017 16:22:46 +0000 (09:22 -0700)]
[release-branch.go1.8] doc: document go1.8.1

Change-Id: I9282c1907204ec5c6363de84faec222a38300c9f
Reviewed-on: https://go-review.googlesource.com/39919
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-on: https://go-review.googlesource.com/39921
Reviewed-by: Chris Broadfoot <cbro@golang.org>
7 years ago[release-branch.go1.8] cmd/go: add test for test -race -i behavior
Russ Cox [Wed, 5 Apr 2017 14:57:03 +0000 (10:57 -0400)]
[release-branch.go1.8] cmd/go: add test for test -race -i behavior

This was fixed in CL 37598 but the test was (rightly) dropped
because it modified $GOROOT. Here's a variant that does not.

For #19151.

Change-Id: Iccdbbf9ae8ac4c252e52f4f8ff996963573c4682
Reviewed-on: https://go-review.googlesource.com/39592
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-on: https://go-review.googlesource.com/39618
Reviewed-by: Austin Clements <austin@google.com>
7 years ago[release-branch.go1.8] cmd/go: do not install broken libraries during 'go test -i...
Russ Cox [Wed, 5 Apr 2017 19:01:21 +0000 (15:01 -0400)]
[release-branch.go1.8] cmd/go: do not install broken libraries during 'go test -i -race'

Manual port of CL 37598 (submitted for Go 1.9) to Go 1.8.1.

Fixes #19133.
Fixes #19151.

Change-Id: I51707ea35068a393022f554b391ee2638dba16b5
Reviewed-on: https://go-review.googlesource.com/39617
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
7 years ago[release-branch.go1.8] cmd/compile: added special case for reflect header fields...
David Chase [Tue, 28 Mar 2017 21:55:26 +0000 (17:55 -0400)]
[release-branch.go1.8] cmd/compile: added special case for reflect header fields to esc

The uintptr-typed Data field in reflect.SliceHeader and
reflect.StringHeader needs special treatment because it is
really a pointer.  Add the special treatment in walk for
bug #19168 to escape analysis.

Includes extra debugging that was helpful.

Fixes #19743.

Change-Id: I6dab5002f0d436c3b2a7cdc0156e4fc48a43d6fe
Reviewed-on: https://go-review.googlesource.com/39616
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
7 years ago[release-branch.go1.8] cmd/compile: add missing WBs for reflect.{Slice,String}Header...
Matthew Dempsky [Thu, 2 Mar 2017 05:46:08 +0000 (21:46 -0800)]
[release-branch.go1.8] cmd/compile: add missing WBs for reflect.{Slice,String}Header.Data

Fixes #19168.

(*state).insertWBstore needed to be tweaked for backporting so that
store reflect.{Slice,String}Header.Data stores still fallthrough and
end the SSA block. This wasn't necessary at master because of CL
36834.

Change-Id: I3f4fcc0b189c53819ac29ef8de86fdad76a17488
Reviewed-on: https://go-review.googlesource.com/39615
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Austin Clements <austin@google.com>
7 years ago[release-branch.go1.8] cmd/link: skip TestDWARF when cgo is disabled
Josh Bleecher Snyder [Thu, 30 Mar 2017 22:07:05 +0000 (15:07 -0700)]
[release-branch.go1.8] cmd/link: skip TestDWARF when cgo is disabled

While we're here, fix a Skip/Skipf error I noticed.

Fixes #19796.

(This fixes failures on the release branch introduced by cherry-pick
CL 39605.)

Change-Id: I59b1f5b5ea727fc314acfee8445b3de0b5af1e46
Reviewed-on: https://go-review.googlesource.com/39612
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

7 years ago[release-branch.go1.8] cmd/link: skip TestDWARF on Plan 9
David du Colombier [Thu, 30 Mar 2017 19:33:06 +0000 (21:33 +0200)]
[release-branch.go1.8] cmd/link: skip TestDWARF on Plan 9

TestDWARF has been added in CL 38855. This test is
failing on Plan 9 because executables don't have
a DWARF symbol table.

Fixes #19793.

(This fixes Plan 9 failures on the release branch introduced by
cherry-pick CL 39605.)

Change-Id: I7fc547a7c877b58cc4ff6b4eb5b14852e8b4668b
Reviewed-on: https://go-review.googlesource.com/39611
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

7 years ago[release-branch.go1.8] encoding/xml: disable checking of attribute syntax, like Go 1.7
Russ Cox [Wed, 5 Apr 2017 15:47:06 +0000 (11:47 -0400)]
[release-branch.go1.8] encoding/xml: disable checking of attribute syntax, like Go 1.7

Consider this struct, which expects an attribute A and a child C both ints:

    type X struct {
        XMLName xml.Name `xml:"X"`
        A       int      `xml:",attr"`
        C       int
    }

Go 1.2 through Go 1.7 were consistent: attributes unchecked,
children strictly checked:

    $ go1.7 run /tmp/x.go
    <X></X>              ok
    <X A=""></X>         ok
    <X A="bad"></X>      ok
    <X></X>              ok
    <X><C></C></X>       ERROR strconv.ParseInt: parsing "": invalid syntax
    <X><C/></X>          ERROR strconv.ParseInt: parsing "": invalid syntax
    <X><C>bad</C></X>    ERROR strconv.ParseInt: parsing "bad": invalid syntax
    $

Go 1.8 made attributes strictly checked, matching children:

    $ go1.8 run /tmp/x.go
    <X></X>              ok
    <X A=""></X>         ERROR strconv.ParseInt: parsing "": invalid syntax
    <X A="bad"></X>      ERROR strconv.ParseInt: parsing "bad": invalid syntax
    <X></X>              ok
    <X><C></C></X>       ERROR strconv.ParseInt: parsing "": invalid syntax
    <X><C/></X>          ERROR strconv.ParseInt: parsing "": invalid syntax
    <X><C>bad</C></X>    ERROR strconv.ParseInt: parsing "bad": invalid syntax
    $

but this broke XML code that had empty attributes (#19333).

In Go 1.9 we plan to start allowing empty children (#13417).
The fix for that will also make empty attributes work again:

    $ go run /tmp/x.go  # Go 1.9 development
    <X></X>              ok
    <X A=""></X>         ok
    <X A="bad"></X>      ERROR strconv.ParseInt: parsing "bad": invalid syntax
    <X></X>              ok
    <X><C></C></X>       ok
    <X><C/></X>          ok
    <X><C>bad</C></X>    ERROR strconv.ParseInt: parsing "bad": invalid syntax
    $

For Go 1.8.1, we want to restore the empty attribute behavior
to match Go 1.7 but not yet change the child behavior as planned for Go 1.9,
since that change hasn't been through release testing.

Instead, restore the more lax Go 1.7 behavior, so that XML files
with empty attributes will not be broken until Go 1.9:

    $ go run /tmp/x.go  # after this CL
    <X></X>              ok
    <X A=""></X>         ok
    <X A="bad"></X>      ok
    <X></X>              ok
    <X><C></C></X>       ERROR strconv.ParseInt: parsing "": invalid syntax
    <X><C/></X>          ERROR strconv.ParseInt: parsing "": invalid syntax
    <X><C>bad</C></X>    ERROR strconv.ParseInt: parsing "bad": invalid syntax
    $

Fixes #19333.

Change-Id: I3d38ebd2509f5b6ea3fd4856327f887f9a1a8085
Reviewed-on: https://go-review.googlesource.com/39607
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Sarah Adams <shadams@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

7 years ago[release-branch.go1.8] reflect: fix out-of-bounds pointers calling no-result method
Austin Clements [Tue, 28 Mar 2017 20:03:24 +0000 (16:03 -0400)]
[release-branch.go1.8] reflect: fix out-of-bounds pointers calling no-result method

reflect.callReflect heap-allocates a stack frame and then constructs
pointers to the arguments and result areas of that frame. However, if
there are no results, the results pointer will point past the end of
the frame allocation. If there are also no arguments, the arguments
pointer will also point past the end of the frame allocation. If the
GC observes either these pointers, it may panic.

Fix this by not constructing these pointers if these areas of the
frame are empty.

This adds a test of calling no-argument/no-result methods via reflect,
since nothing in std did this before. However, it's quite difficult to
demonstrate the actual failure because it depends on both exact
allocation patterns and on GC scanning the goroutine's stack while
inside one of the typedmemmovepartial calls.

I also audited other uses of typedmemmovepartial and
memclrNoHeapPointers in reflect, since these are the most susceptible
to this. These appear to be the only two cases that can construct
out-of-bounds arguments to these functions.

Fixes #19724.
Fixes #19768 (backport).

Change-Id: I4b83c596b5625dc4ad0567b1e281bad4faef972b
Reviewed-on: https://go-review.googlesource.com/39604
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
7 years ago[release-branch.go1.8] cmd/link: emit a mach-o dwarf segment that dsymutil will accept
Russ Cox [Thu, 30 Mar 2017 00:50:34 +0000 (20:50 -0400)]
[release-branch.go1.8] cmd/link: emit a mach-o dwarf segment that dsymutil will accept

Right now, at least with Xcode 8.3, we invoke dsymutil and dutifully
copy what it produces back into the binary, but it has actually dropped
all the DWARF information that we wanted, because it didn't like
the look of go.o.

Make it like the look of go.o.

DWARF is tested in other ways, but typically indirectly and not for cgo programs.
Add a direct test, and one that exercises cgo.
This detects missing dwarf information in cgo-using binaries on macOS,
at least with Xcode 8.3, and possibly earlier versions as well.

Fixes #19772.

The backport to Go 1.8 disables TestDWARF on Windows because Windows
DWARF support is new in Go 1.9.

Change-Id: I0082e52c0bc8fc4e289770ec3dc02f39fd61e743
Reviewed-on: https://go-review.googlesource.com/39605
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
7 years ago[release-branch.go1.8] cmd/link: make mach-o dwarf segment properly aligned
Russ Cox [Thu, 30 Mar 2017 00:53:32 +0000 (20:53 -0400)]
[release-branch.go1.8] cmd/link: make mach-o dwarf segment properly aligned

Without this, the load fails during kernel exec, which results in the
mysterious and completely uninformative "Killed: 9" error.

It appears that the stars (or at least the inputs) were properly aligned
with earlier versions of Xcode so that this happened accidentally.
Make it happen on purpose.

Gregory Man bisected the breakage to this change in LLVM,
which fits the theory nicely:
https://github.com/llvm-mirror/llvm/commit/9a41e59c

Fixes #19734.

Change-Id: Ice67a09af2de29d3c0d5e3fcde6a769580897c95
Reviewed-on: https://go-review.googlesource.com/39603
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

7 years ago[release-branch.go1.8] cmd/link: disable mach-o dwarf munging with -w (in addition...
Russ Cox [Thu, 30 Mar 2017 00:46:20 +0000 (20:46 -0400)]
[release-branch.go1.8] cmd/link: disable mach-o dwarf munging with -w (in addition to -s)

Might as well provide a way around the mach-o munging
that doesn't require stripping all symbols.
After all, -w does mean no DWARF.

For #11887, #19734, and anyone else that needs to disable
this code path without losing the symbol table.

Change-Id: I254b7539f97fb9211fa90f446264b383e7f3980f
Reviewed-on: https://go-review.googlesource.com/39602
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

7 years ago[release-branch.go1.8] cmd/compile: don't crash when slicing non-slice
Josh Bleecher Snyder [Tue, 28 Feb 2017 21:44:33 +0000 (13:44 -0800)]
[release-branch.go1.8] cmd/compile: don't crash when slicing non-slice

Fixes #19323
Fixes #19638 (backport)

Change-Id: I92d1bdefb15de6178a577a4fa0f0dc004f791904
Reviewed-on: https://go-review.googlesource.com/39601
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

7 years ago[release-branch.go1.8] runtime: print user stack on other threads during GOTRACBEACK...
Austin Clements [Fri, 10 Mar 2017 15:59:39 +0000 (10:59 -0500)]
[release-branch.go1.8] runtime: print user stack on other threads during GOTRACBEACK=crash

Currently, when printing tracebacks of other threads during
GOTRACEBACK=crash, if the thread is on the system stack we print only
the header for the user goroutine and fail to print its stack. This
happens because we passed the g0 to traceback instead of curg. The g0
never has anything set in its gobuf, so traceback doesn't print
anything.

Fix this by passing _g_.m.curg to traceback instead of the g0.

Fixes #19494.
Fixes #19637 (backport).

Change-Id: Idfabf94d6a725e9cdf94a3923dead6455ef3b217
Reviewed-on: https://go-review.googlesource.com/39600
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

7 years ago[release-branch.go1.8] test/fixedbugs: add test for #19403
Quentin Smith [Mon, 6 Mar 2017 16:45:19 +0000 (11:45 -0500)]
[release-branch.go1.8] test/fixedbugs: add test for #19403

Change-Id: Ie52dac8eb4daed95e049ad74d5ae101e8a5cb854
Reviewed-on: https://go-review.googlesource.com/39599
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
7 years ago[release-branch.go1.8] cmd/compile: mark MOVWF/MOVFW clobbering F15 on ARM
Cherry Zhang [Sun, 5 Mar 2017 16:37:09 +0000 (11:37 -0500)]
[release-branch.go1.8] cmd/compile: mark MOVWF/MOVFW clobbering F15 on ARM

The assembler back end uses F15 as a temporary register in these
instructions.

Checked the assembler back end and made sure that this is the
only case clobbering F15.

Fixes #19403.

Change-Id: I02b9e00fdd9229db899f501c8e9b306e02912d83
Reviewed-on: https://go-review.googlesource.com/39598
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
7 years ago[release-branch.go1.8] cmd/compile,runtime: fix atomic And8 for mipsle
Vladimir Stefanovic [Tue, 21 Mar 2017 13:57:58 +0000 (14:57 +0100)]
[release-branch.go1.8] cmd/compile,runtime: fix atomic And8 for mipsle

Removing stray xori that came from big endian copy/paste.
Adding atomicand8 check to runtime.check() that would have revealed
this error.
Might fix #19396.

Change-Id: If8d6f25d3e205496163541eb112548aa66df9c2a
Reviewed-on: https://go-review.googlesource.com/39597
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
7 years ago[release-branch.go1.8] cmd/compile: repaired loop-finder to handle trickier nesting
David Chase [Thu, 23 Feb 2017 18:49:25 +0000 (13:49 -0500)]
[release-branch.go1.8] cmd/compile: repaired loop-finder to handle trickier nesting

The loop-A-encloses-loop-C code did not properly handle the
case where really C was already known to be enclosed by B,
and A was nearest-outer to B, not C.

Fixes #19217.

Change-Id: I755dd768e823cb707abdc5302fed39c11cdb34d4
Reviewed-on: https://go-review.googlesource.com/39596
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

7 years ago[release-branch.go1.8] cmd/compile: add opcode flag hasSideEffects for do-not-remove
David Chase [Tue, 21 Feb 2017 20:22:52 +0000 (15:22 -0500)]
[release-branch.go1.8] cmd/compile: add opcode flag hasSideEffects for do-not-remove

Added a flag to generic and various architectures' atomic
operations that are judged to have observable side effects
and thus cannot be dead-code-eliminated.

Test requires GOMAXPROCS > 1 without preemption in loop.

Fixes #19182.

Change-Id: Id2230031abd2cca0bbb32fd68fc8a58fb912070f
Reviewed-on: https://go-review.googlesource.com/39595
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
7 years ago[release-branch.go1.8] cmd/link: do not pass -s through to host linker on macOS
Russ Cox [Thu, 30 Mar 2017 00:39:32 +0000 (20:39 -0400)]
[release-branch.go1.8] cmd/link: do not pass -s through to host linker on macOS

This keeps the host linker from printing
ld: warning: option -s is obsolete and being ignored

Fixes #19775.

Change-Id: I18dd4e4b3f59cbf35dad770fd65e6baea5a7347f
Reviewed-on: https://go-review.googlesource.com/38851
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-on: https://go-review.googlesource.com/39606
TryBot-Result: Gobot Gobot <gobot@golang.org>

7 years ago[release-branch.go1.8] text/template: fix handling of empty blocks
Rob Pike [Tue, 21 Mar 2017 17:00:30 +0000 (10:00 -0700)]
[release-branch.go1.8] text/template: fix handling of empty blocks

This was a subtle bug introduced in the previous release's fix for
issue 16156.

The definition of empty template was broken, causing the answer
to depend on the order of templates in the map.

Fixes #16156 (for real).
Fixes #19294.
Fixes #19204.

Change-Id: I1cd915c94534cad3116d83bd158cbc28700510b9
Reviewed-on: https://go-review.googlesource.com/38420
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/39594
Reviewed-by: Rob Pike <r@golang.org>
7 years ago[release-branch.go1.8] image/png: restore Go 1.7 rejection of transparent gray8 images
Russ Cox [Wed, 5 Apr 2017 15:04:46 +0000 (11:04 -0400)]
[release-branch.go1.8] image/png: restore Go 1.7 rejection of transparent gray8 images

Go 1.7 and earlier rejected these images with chunkOrderError.
Go 1.8 panicked during decoding.
Go 1.9 will handle them successfully.

Make Go 1.8.1 match Go 1.7 and earlier, to remove the panic
without introducing new functionality in a minor release.

Fixes #19553.

Change-Id: I3c73a27aa3932300326273b6b563cdf606f3ab64
Reviewed-on: https://go-review.googlesource.com/39593
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

7 years ago[release-branch.go1.8] net, net/http: adjust time-in-past constant even earlier
Brad Fitzpatrick [Wed, 29 Mar 2017 16:55:58 +0000 (16:55 +0000)]
[release-branch.go1.8] net, net/http: adjust time-in-past constant even earlier

The aLongTimeAgo time value in net and net/http is used to cancel
in-flight read and writes. It was set to time.Unix(233431200, 0)
which seemed like far enough in the past.

But Raspberry Pis, lacking a real time clock, had to spoil the fun and
boot in 1970 at the Unix epoch time, breaking assumptions in net and
net/http.

So change aLongTimeAgo to time.Unix(1, 0), which seems like the
earliest safe value. I don't trust subsecond values on all operating
systems, and I don't trust the Unix zero time. The Raspberry Pis do
advance their clock at least. And the reported problem was that Hijack
on a ResponseWriter hung forever, waiting for the connection read
operation to finish. So now, even if kernel + userspace boots in under
a second (unlikely), the Hijack will just have to wait for up to a
second.

Updates #19747
Fixes #19771 (backport to Go 1.8.x)

Change-Id: Id59430de2e7b5b5117d4903a788863e9d344e53a
Reviewed-on: https://go-review.googlesource.com/38785
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
(cherry picked from commit e83fc2e44336423dab94bfe74fad4c4e6a4703b3)
Reviewed-on: https://go-review.googlesource.com/38786
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
7 years ago[release-branch.go1.8] cmd/compile/internal/ssa: don't schedule values after select
Ilya Tocar [Tue, 21 Feb 2017 22:57:37 +0000 (16:57 -0600)]
[release-branch.go1.8] cmd/compile/internal/ssa: don't schedule values after select

Scheduling values after calls to selectrecv,
will cause them to be executed multiple times, due to runtime.selectgo
jumping to the next instruction in the selectrecv basic block.
Prevent this by scheduling calls to selectrecv as late as possible

Fixes #19201

Change-Id: I6415792e2c465dc6d9bd6583ba1e54b107bcf5cc
Reviewed-on: https://go-review.googlesource.com/38587
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
7 years ago[release-branch.go1.8] os/exec: deflake TestStdinCloseRace
Ian Lance Taylor [Tue, 21 Feb 2017 15:14:51 +0000 (07:14 -0800)]
[release-branch.go1.8] os/exec: deflake TestStdinCloseRace

Stop reporting errors from cmd.Process.Kill; they don't matter for
purposes of this test, and they can occur if the process exits quickly.

Fixes #19211.
Fixes #19213.

Change-Id: I1a0bb9170220ca69199abb8e8811b1dde43e1897
Reviewed-on: https://go-review.googlesource.com/37309
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit 35ffca31b180e6f9da6035326132f048980dc58c)
Reviewed-on: https://go-review.googlesource.com/38607
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
7 years ago[release-branch.go1.8] cmd/link: put plt stubs first in Textp on ppc64x
Lynn Boger [Thu, 23 Mar 2017 14:58:40 +0000 (10:58 -0400)]
[release-branch.go1.8] cmd/link: put plt stubs first in Textp on ppc64x

Previously call stubs were generated and inserted in
Textp after much of the text, resulting in calls too
far in some cases. This puts the call stubs first, which
in many cases makes some calls not so far, but also
enables trampolines to be generated when necessary.

This is a backport for go 1.8 based on CL38131.

Fixes #19578

Change-Id: If3ba3d5222a7f7969ed2de1df4854a1b4a80a0f0
Reviewed-on: https://go-review.googlesource.com/38472
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

7 years ago[release-branch.go1.8] doc: reorganize the contribution guidelines into a guide
Steve Francia [Thu, 9 Feb 2017 20:33:13 +0000 (15:33 -0500)]
[release-branch.go1.8] doc: reorganize the contribution guidelines into a guide

Updates #17802

Change-Id: I65ea0f4cde973604c04051e7eb25d12e4facecd3
Reviewed-on: https://go-review.googlesource.com/36626
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
Reviewed-on: https://go-review.googlesource.com/38312

7 years ago[release-branch.go1.8] time: make the ParseInLocation test more robust
Alberto Donizetti [Thu, 9 Mar 2017 12:20:54 +0000 (13:20 +0100)]
[release-branch.go1.8] time: make the ParseInLocation test more robust

The tzdata 2017a update (2017-02-28) changed the abbreviation of the
Asia/Baghdad time zone (used in TestParseInLocation) from 'AST' to the
numeric '+03'.

Update the test so that it skips the checks if we're using a recent
tzdata release.

Fixes #19457

Change-Id: I45d705a5520743a611bdd194dc8f8d618679980c
Reviewed-on: https://go-review.googlesource.com/37964
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit 91563ced5897faf729a34be7081568efcfedda31)
Reviewed-on: https://go-review.googlesource.com/37991
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>

7 years ago[release-branch.go1.8] crypto/tls: make Config.Clone also clone the GetClientCertific...
Mike Danese [Wed, 1 Mar 2017 18:43:57 +0000 (10:43 -0800)]
[release-branch.go1.8] crypto/tls: make Config.Clone also clone the GetClientCertificate field

Using GetClientCertificate with the http client is currently completely
broken because inside the transport we clone the tls.Config and pass it
off to the tls.Client. Since tls.Config.Clone() does not pass forward
the GetClientCertificate field, GetClientCertificate is ignored in this
context.

Fixes #19264

Change-Id: Ie214f9f0039ac7c3a2dab8ffd14d30668bdb4c71
Signed-off-by: Mike Danese <mikedanese@google.com>
Reviewed-on: https://go-review.googlesource.com/37541
Reviewed-by: Filippo Valsorda <hi@filippo.io>
Reviewed-by: Adam Langley <agl@golang.org>
Run-TryBot: Adam Langley <agl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit 87649d32ad16a9a0b7bd5dbd1c124b2032a270f1)
Reviewed-on: https://go-review.googlesource.com/37946
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Tom Bergan <tombergan@google.com>
7 years ago[release-branch.go1.8] cmd/compile: do not fold offset into load/store for args on...
Cherry Zhang [Sun, 19 Feb 2017 02:03:15 +0000 (21:03 -0500)]
[release-branch.go1.8] cmd/compile: do not fold offset into load/store for args on ARM64

Args may be not at 8-byte aligned offset to SP. When the stack
frame is large, folding the offset of args may cause large
unaligned offsets that does not fit in a machine instruction on
ARM64. Therefore disable folding offsets for args.

This has small performance impact (see below). A better fix would
be letting the assembler backend fix up the offset by loading it
into a register if it doesn't fit into an instruction. And the
compiler can simply generate large load/stores with offset. Since
in most of the cases the offset is aligned or the stack frame is
small, it can fit in an instruction and no fixup is needed. But
this is too complicated for Go 1.8.

name                     old time/op    new time/op    delta
BinaryTree17-8              8.30s Â± 0%     8.31s Â± 0%    ~     (p=0.579 n=10+10)
Fannkuch11-8                6.14s Â± 0%     6.18s Â± 0%  +0.53%  (p=0.000 n=9+10)
FmtFprintfEmpty-8           117ns Â± 0%     117ns Â± 0%    ~     (all equal)
FmtFprintfString-8          196ns Â± 0%     197ns Â± 0%  +0.72%  (p=0.000 n=10+10)
FmtFprintfInt-8             204ns Â± 0%     205ns Â± 0%  +0.49%  (p=0.000 n=9+10)
FmtFprintfIntInt-8          302ns Â± 0%     307ns Â± 1%  +1.46%  (p=0.000 n=10+10)
FmtFprintfPrefixedInt-8     329ns Â± 2%     326ns Â± 0%    ~     (p=0.083 n=10+10)
FmtFprintfFloat-8           540ns Â± 0%     542ns Â± 0%  +0.46%  (p=0.000 n=8+7)
FmtManyArgs-8              1.20µs Â± 1%    1.19µs Â± 1%  -1.02%  (p=0.000 n=10+10)
GobDecode-8                17.3ms Â± 1%    17.8ms Â± 0%  +2.75%  (p=0.000 n=10+7)
GobEncode-8                15.3ms Â± 1%    15.4ms Â± 0%  +0.57%  (p=0.004 n=9+10)
Gzip-8                      789ms Â± 0%     803ms Â± 0%  +1.78%  (p=0.000 n=9+10)
Gunzip-8                    128ms Â± 0%     130ms Â± 0%  +1.73%  (p=0.000 n=10+9)
HTTPClientServer-8          202µs Â± 6%     201µs Â±10%    ~     (p=0.739 n=10+10)
JSONEncode-8               42.0ms Â± 0%    42.1ms Â± 0%  +0.19%  (p=0.028 n=10+9)
JSONDecode-8                159ms Â± 0%     161ms Â± 0%  +1.05%  (p=0.000 n=9+10)
Mandelbrot200-8            10.1ms Â± 0%    10.1ms Â± 0%  -0.07%  (p=0.000 n=10+9)
GoParse-8                  8.46ms Â± 1%    8.61ms Â± 1%  +1.77%  (p=0.000 n=10+10)
RegexpMatchEasy0_32-8       227ns Â± 1%     226ns Â± 0%  -0.35%  (p=0.001 n=10+9)
RegexpMatchEasy0_1K-8      1.63µs Â± 0%    1.63µs Â± 0%  -0.13%  (p=0.000 n=10+9)
RegexpMatchEasy1_32-8       250ns Â± 0%     249ns Â± 0%  -0.40%  (p=0.001 n=8+9)
RegexpMatchEasy1_1K-8      2.07µs Â± 0%    2.08µs Â± 0%  +0.05%  (p=0.027 n=9+9)
RegexpMatchMedium_32-8      350ns Â± 0%     350ns Â± 0%    ~     (p=0.412 n=9+8)
RegexpMatchMedium_1K-8      104µs Â± 0%     104µs Â± 0%  +0.31%  (p=0.000 n=10+7)
RegexpMatchHard_32-8       5.82µs Â± 0%    5.82µs Â± 0%    ~     (p=0.937 n=9+9)
RegexpMatchHard_1K-8        176µs Â± 0%     176µs Â± 0%  +0.03%  (p=0.000 n=9+8)
Revcomp-8                   1.36s Â± 1%     1.37s Â± 1%    ~     (p=0.218 n=10+10)
Template-8                  151ms Â± 1%     156ms Â± 1%  +3.21%  (p=0.000 n=10+10)
TimeParse-8                 737ns Â± 0%     758ns Â± 2%  +2.74%  (p=0.000 n=10+10)
TimeFormat-8                801ns Â± 2%     789ns Â± 1%  -1.51%  (p=0.000 n=10+10)
[Geo mean]                  142µs          143µs       +0.50%

Fixes #19137.

Change-Id: Ib8a21ea98c0ffb2d282a586535b213cc163e1b67
Reviewed-on: https://go-review.googlesource.com/37251
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
(cherry picked from commit 6464e5dc4b84a4348e6698f97c5bfc462a0e3a5e)
Reviewed-on: https://go-review.googlesource.com/37719
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
7 years ago[release-branch.go1.8] cmd/compile: check both syms when folding address into load...
Cherry Zhang [Fri, 17 Feb 2017 15:27:43 +0000 (10:27 -0500)]
[release-branch.go1.8] cmd/compile: check both syms when folding address into load/store on ARM64

The rules for folding addresses into load/stores checks sym1 is
not on stack (because the stack offset is not known at that point).
But sym1 could be nil, which invalidates the check. Check merged
sym instead.

Fixes #19137.

Change-Id: I8574da22ced1216bb5850403d8f08ec60a8d1005
Reviewed-on: https://go-review.googlesource.com/37145
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
(cherry picked from commit 3557d546090c7fedd69562c88d20767397de835d)
Reviewed-on: https://go-review.googlesource.com/37214

7 years ago[release-branch.go1.8] cmd/compile: add zero-extension before right shift when loweri...
Cherry Zhang [Fri, 3 Mar 2017 17:22:55 +0000 (12:22 -0500)]
[release-branch.go1.8] cmd/compile: add zero-extension before right shift when lowering Lrot on ARM

Fixes #19270.

Change-Id: Ie7538ff8465138a8bc02572e84cf5d00de7bbdd1
Reviewed-on: https://go-review.googlesource.com/37718
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
7 years ago[release-branch.go1.8] cmd/compile: fix merging of s390x conditional moves into branc...
Michael Munday [Tue, 21 Feb 2017 20:20:38 +0000 (15:20 -0500)]
[release-branch.go1.8] cmd/compile: fix merging of s390x conditional moves into branch conditions

A type conversion inserted between MOVD{LT,LE,GT,GE,EQ,NE} and CMPWconst
by CL 36256 broke the rewrite rule designed to merge the two.
This results in simple for loops (e.g. for i := 0; i < N; i++ {})
emitting two comparisons instead of one, plus a conditional move.

This CL explicitly types the input to CMPWconst so that the type conversion
can be omitted. It also adds a test to check that conditional moves aren't
emitted for loops with 'less than' conditions (i.e. i < N) on s390x.

Fixes #19227.

Change-Id: I44958eebf6c74c5819b2a9511caf3c47c20fbf45
Reviewed-on: https://go-review.googlesource.com/37536
Run-TryBot: Michael Munday <munday@ca.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bill O'Farrell <billotosyr@gmail.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
7 years ago[release-branch.go1.8] cmd/compile: remove unnecessary type conversions on s390x
Michael Munday [Tue, 28 Feb 2017 19:28:28 +0000 (14:28 -0500)]
[release-branch.go1.8] cmd/compile: remove unnecessary type conversions on s390x

Some rules insert MOVDreg ops to ensure that type changes are kept.
If there is no type change (or the input is constant) then the MOVDreg
can be omitted, allowing further optimization.

Reduces the size of the .text section in the asm tool by ~33KB.

For #19227.

Change-Id: I0f7b40d8dbcda73bca96eb6d2bf13f9ffa88f4b6
Reviewed-on: https://go-review.googlesource.com/37535
Run-TryBot: Michael Munday <munday@ca.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
7 years ago[release-branch.go1.8] runtime: avoid O(n) semaphore list walk in contention profiling
Russ Cox [Thu, 23 Feb 2017 20:13:25 +0000 (15:13 -0500)]
[release-branch.go1.8] runtime: avoid O(n) semaphore list walk in contention profiling

Contention profiling is off by default.
If you turn it on, it has the unfortunate effect of making
the wakeup on a contention mutex go from O(1) to O(n).
Change it back to O(1).

This is already fixed in essentially the same way on master;
master also contains some fixes for the non-profiling code
paths.

Possible for Go 1.8.1.

Change-Id: Iaa644c06e20ca28da4dfa348b7211eedb657e0ba
Reviewed-on: https://go-review.googlesource.com/37341
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
7 years ago[release-branch.go1.8] website: mention go1.8 in project page
Alberto Donizetti [Thu, 23 Feb 2017 18:36:34 +0000 (19:36 +0100)]
[release-branch.go1.8] website: mention go1.8 in project page

Fixes #19253

Change-Id: Ia473f51bfe4cf42cf64938993a81d9b1dbc2594d
Reviewed-on: https://go-review.googlesource.com/37433
Reviewed-by: Chris Broadfoot <cbro@golang.org>
Reviewed-on: https://go-review.googlesource.com/37398

7 years ago[release-branch.go1.8] doc: fix broken link in go1.8.html
Brad Fitzpatrick [Wed, 22 Feb 2017 22:23:35 +0000 (22:23 +0000)]
[release-branch.go1.8] doc: fix broken link in go1.8.html

Fixes #19244

Change-Id: Ia6332941b229c83d6fd082af49f31003a66b90db
Reviewed-on: https://go-review.googlesource.com/37388
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-on: https://go-review.googlesource.com/37397
Reviewed-by: Chris Broadfoot <cbro@golang.org>
7 years ago[release-branch.go1.8] go1.8 go1.8
Chris Broadfoot [Thu, 16 Feb 2017 16:41:18 +0000 (08:41 -0800)]
[release-branch.go1.8] go1.8

Change-Id: If1e38f02db86449abd4c8a57988d9825b1cf2511
Reviewed-on: https://go-review.googlesource.com/37132
Run-TryBot: Chris Broadfoot <cbro@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
7 years ago[release-branch.go1.8] doc: document go1.8
Chris Broadfoot [Thu, 16 Feb 2017 16:29:46 +0000 (08:29 -0800)]
[release-branch.go1.8] doc: document go1.8

Change-Id: Ie2144d001c6b4b2293d07b2acf62d7e3cd0b46a7
Reviewed-on: https://go-review.googlesource.com/37130
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/37131

7 years ago[release-branch.go1.8] runtime: do not call wakep from enlistWorker, to avoid possibl...
Russ Cox [Wed, 15 Feb 2017 20:41:50 +0000 (15:41 -0500)]
[release-branch.go1.8] runtime: do not call wakep from enlistWorker, to avoid possible deadlock

We have seen one instance of a production job suddenly spinning to
100% CPU and becoming unresponsive. In that one instance, a SIGQUIT
was sent after 328 minutes of spinning, and the stacks showed a single
goroutine in "IO wait (scan)" state.

Looking for things that might get stuck if a goroutine got stuck in
scanning a stack, we found that injectglist does:

lock(&sched.lock)
var n int
for n = 0; glist != nil; n++ {
gp := glist
glist = gp.schedlink.ptr()
casgstatus(gp, _Gwaiting, _Grunnable)
globrunqput(gp)
}
unlock(&sched.lock)

and that casgstatus spins on gp.atomicstatus until the _Gscan bit goes
away. Essentially, this code locks sched.lock and then while holding
sched.lock, waits to lock gp.atomicstatus.

The code that is doing the scan is:

if castogscanstatus(gp, s, s|_Gscan) {
if !gp.gcscandone {
scanstack(gp, gcw)
gp.gcscandone = true
}
restartg(gp)
break loop
}

More analysis showed that scanstack can, in a rare case, end up
calling back into code that acquires sched.lock. For example:

runtime.scanstack at proc.go:866
calls runtime.gentraceback at mgcmark.go:842
calls runtime.scanstack$1 at traceback.go:378
calls runtime.scanframeworker at mgcmark.go:819
calls runtime.scanblock at mgcmark.go:904
calls runtime.greyobject at mgcmark.go:1221
calls (*runtime.gcWork).put at mgcmark.go:1412
calls (*runtime.gcControllerState).enlistWorker at mgcwork.go:127
calls runtime.wakep at mgc.go:632
calls runtime.startm at proc.go:1779
acquires runtime.sched.lock at proc.go:1675

This path was found with an automated deadlock-detecting tool.
There are many such paths but they all go through enlistWorker -> wakep.

The evidence strongly suggests that one of these paths is what caused
the deadlock we observed. We're running those jobs with
GOTRACEBACK=crash now to try to get more information if it happens
again.

Further refinement and analysis shows that if we drop the wakep call
from enlistWorker, the remaining few deadlock cycles found by the tool
are all false positives caused by not understanding the effect of calls
to func variables.

The enlistWorker -> wakep call was intended only as a performance
optimization, it rarely executes, and if it does execute at just the
wrong time it can (and plausibly did) cause the deadlock we saw.

Comment it out, to avoid the potential deadlock.

Fixes #19112.
Unfixes #14179.

Change-Id: I6f7e10b890b991c11e79fab7aeefaf70b5d5a07b
Reviewed-on: https://go-review.googlesource.com/37093
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-on: https://go-review.googlesource.com/37022
TryBot-Result: Gobot Gobot <gobot@golang.org>

7 years ago[release-branch.go1.8] doc: update Code of Conduct wording and scope
Sarah Adams [Tue, 14 Feb 2017 23:34:46 +0000 (15:34 -0800)]
[release-branch.go1.8] doc: update Code of Conduct wording and scope

This change removes the punitive language and anonymous reporting mechanism
from the Code of Conduct document. Read on for the rationale.

More than a year has passed since the Go Code of Conduct was introduced.
In that time, there have been a small number (<30) of reports to the Working Group.
Some reports we handled well, with positive outcomes for all involved.
A few reports we handled badly, resulting in hurt feelings and a bad
experience for all involved.

On reflection, the reports that had positive outcomes were ones where the
Working Group took the role of advisor/facilitator, listening to complaints and
providing suggestions and advice to the parties involved.
The reports that had negative outcomes were ones where the subject of the
report felt threatened by the Working Group and Code of Conduct.

After some discussion among the Working Group, we saw that we are most
effective as facilitators, rather than disciplinarians. The various Go spaces
already have moderators; this change to the CoC acknowledges their authority
and places the group in a purely advisory role. If an incident is
reported to the group we may provide information to or make a
suggestion the moderators, but the Working Group need not (and should not) have
any authority to take disciplinary action.

In short, we want it to be clear that the Working Group are here to help
resolve conflict, period.

The second change made here is the removal of the anonymous reporting mechanism.
To date, the quality of anonymous reports has been low, and with no way to
reach out to the reporter for more information there is often very little we
can do in response. Removing this one-way reporting mechanism strengthens the
message that the Working Group are here to facilitate a constructive dialogue.

Change-Id: Iee52aff5446accd0dae0c937bb3aa89709ad5fb4
Reviewed-on: https://go-review.googlesource.com/37014
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/37040
Reviewed-by: Chris Broadfoot <cbro@golang.org>
7 years ago[release-branch.go1.8] encoding/xml: fix incorrect indirect code in chardata, comment...
Russ Cox [Tue, 14 Feb 2017 05:17:50 +0000 (00:17 -0500)]
[release-branch.go1.8] encoding/xml: fix incorrect indirect code in chardata, comment, innerxml fields

The new tests in this CL have been checked against Go 1.7 as well
and all pass in Go 1.7, with the one exception noted in a comment
(an intentional change to omitempty already present before this CL).

CL 15684 made the intentional change to omitempty.
This CL fixes bugs introduced along the way.

Most of these are corner cases that are arguably not that important,
but they've always worked all the way back to Go 1, and someone
cared enough to file #19063. The most significant problem found
while adding tests is that in the case of a nil *string field with
`xml:",chardata"`, the existing code silently stops processing not just
that field but the entire remainder of the struct.
Even if #19063 were not worth fixing, this chardata bug would be.

Fixes #19063.

Change-Id: I318cf8f9945e1a4615982d9904e109fde577ebf9
Reviewed-on: https://go-review.googlesource.com/36954
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit 72aa757dddad7e915f4faad87aacf8010d91561b)
Reviewed-on: https://go-review.googlesource.com/37016
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
7 years ago[release-branch.go1.8] database/sql: convert test timeouts to explicit waits with...
Daniel Theophanes [Sun, 12 Feb 2017 23:12:52 +0000 (15:12 -0800)]
[release-branch.go1.8] database/sql: convert test timeouts to explicit waits with checks

When testing context cancelation behavior do not rely on context
timeouts. Use explicit checks in all such tests. In closeDB
convert the simple check for zero open conns with a wait loop
for zero open conns.

Fixes #19024
Fixes #19041

Change-Id: Iecfcc4467e91249fceb21ffd1f7c62c58140d8e9
Reviewed-on: https://go-review.googlesource.com/36902
Run-TryBot: Daniel Theophanes <kardianos@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/36917
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
7 years ago[release-branch.go1.8] reflect: clear ptrToThis in Ptr when allocating result on...
Michael Hudson-Doyle [Fri, 10 Feb 2017 00:08:13 +0000 (13:08 +1300)]
[release-branch.go1.8] reflect: clear ptrToThis in Ptr when allocating result on heap

Otherwise, calling PtrTo on the result will fail.

Fixes #19003

Change-Id: I8d7d1981a5d0417d5aee52740469d71e90734963
Reviewed-on: https://go-review.googlesource.com/36731
Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/36718
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
7 years ago[release-branch.go1.8] database/sql: ensure driverConns are closed if not returned...
Daniel Theophanes [Thu, 9 Feb 2017 05:38:51 +0000 (21:38 -0800)]
[release-branch.go1.8] database/sql: ensure driverConns are closed if not returned to pool

Previously if a connection was requested but timed out during the
request and when acquiring the db.Lock the connection request
is fulfilled and the request is unable to be returned to the
connection pool, then then driver connection would not be closed.

No tests were added or modified because I was unable to determine
how to trigger this situation without something invasive.

Change-Id: I9d4dc680e3fdcf63d79d212174a5b8b313f363f1
Reviewed-on: https://go-review.googlesource.com/36641
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/36714
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
7 years ago[release-branch.go1.8] database/sql: do not exhaust connection pool on conn request...
Daniel Theophanes [Wed, 8 Feb 2017 18:32:22 +0000 (10:32 -0800)]
[release-branch.go1.8] database/sql: do not exhaust connection pool on conn request timeout

Previously if a context was canceled while it was waiting for a
connection request, that connection request would leak.

To prevent this remove the pending connection request if the
context is canceled and ensure no connection has been sent on the channel.
This requires a change to how the connection requests are represented in the DB.

Fixes #18995

Change-Id: I9a274b48b8f4f7ca46cdee166faa38f56d030852
Reviewed-on: https://go-review.googlesource.com/36563
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/36613
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
7 years ago[release-branch.go1.8] database/sql: record the context error in Rows if canceled
Daniel Theophanes [Tue, 7 Feb 2017 18:19:02 +0000 (10:19 -0800)]
[release-branch.go1.8] database/sql: record the context error in Rows if canceled

Previously it was intended that Rows.Scan would return
an error and Rows.Err would return nil. This was problematic
because drivers could not differentiate between a normal
Rows.Close or a context cancel close.

The alternative is to require drivers to return a Scan to return
an error if the driver is closed while there are still rows to be read.
This is currently not how several drivers currently work and may be
difficult to detect when there are additional rows.

At the same time guard the the Rows.lasterr and prevent a close
while a Rows operation is active.

For the drivers that do not have Context methods, do not check for
context cancelation after the operation, but before for any operation
that may modify the database state.

Fixes #18961

Change-Id: I49a25318ecd9f97a35d5b50540ecd850c01cfa5e
Reviewed-on: https://go-review.googlesource.com/36485
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/36614
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
7 years ago[release-branch.go1.8] crypto/x509: check for new tls-ca-bundle.pem last
Russ Cox [Tue, 7 Feb 2017 16:59:38 +0000 (11:59 -0500)]
[release-branch.go1.8] crypto/x509: check for new tls-ca-bundle.pem last

We added CentOS 7's /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
to the list in response to #17549 - not being able to find any certs otherwise.

Now we have #18813, where CentOS 6 apparently has both that file
and /etc/pki/tls/certs/ca-bundle.crt, and the latter is complete while
the former is not.

Moving the new CentOS 7 file to the bottom of the list should fix both
problems: the CentOS 7 system that didn't have any of the other files
in the list will still find the new one, and existing systems will still
keep using what they were using instead of preferring the new path
that may or may not be complete on some systems.

Fixes #18813.

Change-Id: I5275ab67424b95e7210e14938d3e986c8caee0ba
Reviewed-on: https://go-review.googlesource.com/36429
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Adam Langley <agl@golang.org>
Reviewed-on: https://go-review.googlesource.com/36530
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
7 years ago[release-branch.go1.8] cmd/go, go/build: better defenses against GOPATH=GOROOT
Russ Cox [Tue, 7 Feb 2017 15:29:32 +0000 (10:29 -0500)]
[release-branch.go1.8] cmd/go, go/build: better defenses against GOPATH=GOROOT

Fixes #18863.

Change-Id: I0723563cd23728b0d43ebcc25979bf8d21e2a72c
Reviewed-on: https://go-review.googlesource.com/36427
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-on: https://go-review.googlesource.com/36536
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

7 years ago[release-branch.go1.8] cmd/compile: do not use "oaslit" for global
Cherry Zhang [Mon, 6 Feb 2017 19:24:16 +0000 (14:24 -0500)]
[release-branch.go1.8] cmd/compile: do not use "oaslit" for global

The compiler did not emit write barrier for assigning global with
struct literal, like global = T{} where T contains pointer.

The relevant code path is:
walkexpr OAS var_ OSTRUCTLIT
    oaslit
        anylit OSTRUCTLIT
            walkexpr OAS var_ nil
            return without adding write barrier
    return true
break (without adding write barrier)

This CL makes oaslit not apply to globals. See also CL
https://go-review.googlesource.com/c/36355/ for an alternative
fix.

The downside of this is that it generates static data for zeroing
struct now. Also this only covers global. If there is any lurking
bug with implicit zeroing other than globals, this doesn't fix.

Fixes #18956.

Change-Id: Ibcd27e4fae3aa38390ffa94a32a9dd7a802e4b37
Reviewed-on: https://go-review.googlesource.com/36410
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit 160914e33ca6521d74297291d801062cc44d794d)
Reviewed-on: https://go-review.googlesource.com/36531

7 years ago[release-branch.go1.8] cmd/compile/internal/syntax: avoid follow-up error for incorre...
Robert Griesemer [Tue, 7 Feb 2017 06:01:07 +0000 (22:01 -0800)]
[release-branch.go1.8] cmd/compile/internal/syntax: avoid follow-up error for incorrect if statement

This is a follow-up on https://go-review.googlesource.com/36470
and leads to a more stable fix. The above CL relied on filtering
of multiple errors on the same line to avoid more than one error
for an `if` statement of the form `if a := 10 {}`. This CL avoids
the secondary error ("missing condition in if statement") in the
first place.

For #18915.

Change-Id: I8517f485cc2305965276c17d8f8797d61ef9e999
Reviewed-on: https://go-review.googlesource.com/36479
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-on: https://go-review.googlesource.com/36424
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
7 years ago[release-branch.go1.8] cmd/compile/internal/syntax: make a parser error "1.7 compliant"
Robert Griesemer [Mon, 6 Feb 2017 23:08:28 +0000 (15:08 -0800)]
[release-branch.go1.8] cmd/compile/internal/syntax: make a parser error "1.7 compliant"

For code such as

if a := 10 { ...

the 1.7 compiler reported

a := 10 used as value

while the 1.8 compiler reported

invalid condition, tag, or type switch guard

Changed the error message to match the 1.7 compiler.

Fixes #18915.

Change-Id: I01308862e461922e717f9f8295a9db53d5a914eb
Reviewed-on: https://go-review.googlesource.com/36470
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/36422
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
7 years ago[release-branch.go1.8] cmd/link: use external linking for PIE by default
David Crawshaw [Mon, 6 Feb 2017 22:52:26 +0000 (17:52 -0500)]
[release-branch.go1.8] cmd/link: use external linking for PIE by default

Now `go test -buildmode=pie std -short` passes on linux/amd64.

Updates #18968

Change-Id: Ide21877713e00edc64c1700c950016d6bff8de0e
Reviewed-on: https://go-review.googlesource.com/36417
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/36421
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
7 years ago[release-branch.go1.8] doc: remove inactive members of the CoC working group
Andrew Gerrand [Mon, 6 Feb 2017 21:05:01 +0000 (08:05 +1100)]
[release-branch.go1.8] doc: remove inactive members of the CoC working group

Dave and Jason have moved on to other things.

Change-Id: I702d11bedfab1f47a33679a48c2309f49021229e
Reviewed-on: https://go-review.googlesource.com/36450
Reviewed-by: Dave Cheney <dave@cheney.net>
Reviewed-on: https://go-review.googlesource.com/36474
Reviewed-by: Andrew Gerrand <adg@golang.org>
7 years ago[release-branch.go1.8] vendor/golang.org/x/crypto/curve25519: avoid loss of R15 in...
Russ Cox [Mon, 6 Feb 2017 19:41:12 +0000 (14:41 -0500)]
[release-branch.go1.8] vendor/golang.org/x/crypto/curve25519: avoid loss of R15 in -dynlink mode

Original code fixed in https://go-review.googlesource.com/#/c/36359/.

Fixes #18820.

Change-Id: I060e6c9d0e312b4fd5d0674aff131055bf5cf61d
Reviewed-on: https://go-review.googlesource.com/36412
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Adam Langley <agl@golang.org>
Reviewed-on: https://go-review.googlesource.com/36414
Reviewed-by: Austin Clements <austin@google.com>
7 years ago[release-branch.go1.8] cmd/compile: do not fold large offset on ARM64
Cherry Zhang [Mon, 6 Feb 2017 20:05:41 +0000 (15:05 -0500)]
[release-branch.go1.8] cmd/compile: do not fold large offset on ARM64

Fixes #18933.

Change-Id: I1ab524fdca006100ec6af572065b496f68d6a5c3
Reviewed-on: https://go-review.googlesource.com/36413
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
7 years ago[release-branch.go1.8] cmd/compile: fix type propagation through s390x SSA rules
Michael Munday [Fri, 3 Feb 2017 21:47:32 +0000 (16:47 -0500)]
[release-branch.go1.8] cmd/compile: fix type propagation through s390x SSA rules

This CL fixes two issues:

1. Load ops were initially always lowered to unsigned loads, even
   for signed types. This was fine by itself however LoadReg ops
   (used to re-load spilled values) were lowered to signed loads
   for signed types. This meant that spills could invalidate
   optimizations that assumed the original unsigned load.

2. Types were not always being maintained correctly through rules
   designed to eliminate unnecessary zero and sign extensions.

Updates #18906 and fixes #18958 (backport of CL 36256 to 1.8).

Change-Id: Id44953b0f644cad047e8474edbd24e8a344ca9a7
Reviewed-on: https://go-review.googlesource.com/36350
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
7 years ago[release-branch.go1.8] testing: stop timeout-timer after running tests
Alberto Donizetti [Sun, 29 Jan 2017 19:53:35 +0000 (20:53 +0100)]
[release-branch.go1.8] testing: stop timeout-timer after running tests

Fixes #18845

Fixes #18870 (Go 1.8 backport)

Change-Id: Icdc3e2067807781e42f2ffc94d1824aed94d3713
Reviewed-on: https://go-review.googlesource.com/35956
Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit 7d8bfdde453445affb50fcaeacc050938ec98467)
Reviewed-on: https://go-review.googlesource.com/36125

7 years ago[release-branch.go1.8] doc: mention SHA-256 CBC suites are off by default
Filippo Valsorda [Wed, 1 Feb 2017 19:57:11 +0000 (19:57 +0000)]
[release-branch.go1.8] doc: mention SHA-256 CBC suites are off by default

Change-Id: I82c41bd1d82adda457ddb5dd08caf0647905da22
Reviewed-on: https://go-review.googlesource.com/36091
Reviewed-by: Matt Layher <mdlayher@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit de479267ef9db0911dac68e94d75186313bae11d)
Reviewed-on: https://go-review.googlesource.com/36130

7 years ago[release-branch.go1.8] all: final merge of master into Go 1.8 release branch
Russ Cox [Mon, 30 Jan 2017 21:55:52 +0000 (16:55 -0500)]
[release-branch.go1.8] all: final merge of master into Go 1.8 release branch

After this, we will merge some of the dev work like
type aliases and inlining into master, so any additional
changes for the Go 1.8 release will need to be cherry-picked,
not merged.

3e55059f cmd/dist: really skip the testsanitizers tests on Android
09496599 runtime: add explicit (void) in C to avoid GCC 7 problem
4cffe2b6 cmd/dist: use the target GOOS to skip the test for issue 18153
6bdb0c11 doc: update go1.8 release notes after TxOptions change
09096bd3 cmd/go: update alldocs after CL 35150
96ea0918 cmd/compile: use CMPWU for 32-bit or smaller unsigned Geq on ppc64{,le}
21a8db1c doc: document go1.7.5

Change-Id: I9e6a30c3fac43d4d4d15e93054ac00964c3ee958

7 years agocmd/dist: really skip the testsanitizers tests on Android
Elias Naur [Mon, 30 Jan 2017 18:55:35 +0000 (19:55 +0100)]
cmd/dist: really skip the testsanitizers tests on Android

The test.bash script in misc/cgo/testsanitizers use GOOS, not GOHOSTOS.
Fix the dist check from gohostos to goos accordingly.

The error was masked on the builders because they run on a darwin host
where the sanitizers tests never ran.

With this change, the Android test suite completes successfully on
Android/amd64.

Change-Id: Id7690429f78c6ac7a26fc9118d913b719b565bb2
Reviewed-on: https://go-review.googlesource.com/35959
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

7 years agoruntime: add explicit (void) in C to avoid GCC 7 problem
Ian Lance Taylor [Mon, 30 Jan 2017 17:43:25 +0000 (09:43 -0800)]
runtime: add explicit (void) in C to avoid GCC 7 problem

This avoids errors like
    ./traceback.go:80:2: call of non-function C.f1

I filed https://gcc.gnu.org/PR79289 for the GCC problem. I think this
is a bug in GCC, and it may be fixed before the final GCC 7 release.
This CL is correct either way.

Fixes #18855.

Change-Id: I0785a7b7c5b1d0ca87b454b5eca9079f390fcbd4
Reviewed-on: https://go-review.googlesource.com/35919
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
7 years agocmd/dist: use the target GOOS to skip the test for issue 18153
Elias Naur [Sun, 29 Jan 2017 22:57:14 +0000 (23:57 +0100)]
cmd/dist: use the target GOOS to skip the test for issue 18153

Fixes (skips) the test on Android, where stdout/stderr are not
terminals.

Updates #18153

Change-Id: Ieca65150362a5c423747ad751e00f76f0b890746
Reviewed-on: https://go-review.googlesource.com/35957
Run-TryBot: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
7 years agodoc: update go1.8 release notes after TxOptions change
Daniel Theophanes [Sat, 28 Jan 2017 15:36:09 +0000 (07:36 -0800)]
doc: update go1.8 release notes after TxOptions change

Missed the release notes when updating the sql API.

Fixes #18825

Change-Id: I89056d46939ad4fc99590f3434d2881f5764e1b6
Reviewed-on: https://go-review.googlesource.com/35915
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
7 years agocmd/go: update alldocs after CL 35150
Alberto Donizetti [Sat, 28 Jan 2017 10:56:15 +0000 (11:56 +0100)]
cmd/go: update alldocs after CL 35150

Author of CL 35150 forgot to run mkalldocs.sh to update
the autogenerated alldocs.go

Change-Id: Ib824562db6044702456a221a8c6f9af412927a98
Reviewed-on: https://go-review.googlesource.com/35952
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
7 years agocmd/compile: use CMPWU for 32-bit or smaller unsigned Geq on ppc64{,le}
Michael Munday [Fri, 27 Jan 2017 04:31:28 +0000 (23:31 -0500)]
cmd/compile: use CMPWU for 32-bit or smaller unsigned Geq on ppc64{,le}

Fixes #18808.

Change-Id: I49b266380b9d6804c9f6563ebac9c7c0e05f37f6
Reviewed-on: https://go-review.googlesource.com/35890
Run-TryBot: Michael Munday <munday@ca.ibm.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
7 years ago[release-branch.go1.8] go1.8rc3 go1.8rc3
Chris Broadfoot [Thu, 26 Jan 2017 17:40:29 +0000 (09:40 -0800)]
[release-branch.go1.8] go1.8rc3

Change-Id: Ie306bb5355f56113356fc141f3c1a56872b39f9e
Reviewed-on: https://go-review.googlesource.com/35836
Reviewed-by: Chris Broadfoot <cbro@golang.org>
7 years agodoc: document go1.7.5
Chris Broadfoot [Thu, 26 Jan 2017 17:30:04 +0000 (09:30 -0800)]
doc: document go1.7.5

Change-Id: Ic8d4e971edebba9412f2e7c3d3c29f296c4977ff
Reviewed-on: https://go-review.googlesource.com/35833
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
7 years ago[release-branch.go1.8] all: merge master into release-branch.go1.8
Chris Broadfoot [Thu, 26 Jan 2017 17:24:20 +0000 (09:24 -0800)]
[release-branch.go1.8] all: merge master into release-branch.go1.8

78860b2ad2 cmd/go: don't reject ./... matching top-level file outside GOPATH
2b283cedef database/sql: fix race when canceling queries immediately
1cf08182f9 go/printer: fix format with leading comments in composite literal
b531eb3062 runtime: reorder modules so main.main comes first
165cfbc409 database/sql: let tests wait for db pool to come to expected state
ea73649343 doc: update gccgo docs
1db16711f5 doc: clarify what to do with Go 1.4 when installing from source
3717b429f2 doc: note that plugins are not fully baked
98842cabb6 net/http: don't send body on redirects for 301, 302, 303 when GetBody is set
314180e7f6 net/http: fix a nit
aad06da2b9 cmd/link: mark DWARF function symbols as reachable
be9dcfec29 doc: mention testing.MainStart signature change
a96e117a58 runtime: amd64, use 4-byte ops for memmove of 4 bytes
4cce27a3fa cmd/compile: fix constant propagation through s390x MOVDNE instructions
1be957d703 misc/cgo/test: pass current environment to syscall.Exec
ec654e2251 misc/cgo/test: fix test when using GCC 7
256a605faa cmd/compile: don't use nilcheck information until the next block
e8d5989ed1 cmd/compile: fix compilebench -alloc
ea7d9e6a52 runtime: check for nil g and m in msanread

Change-Id: I61d508d4f0efe4b72e7396645c8ad6088d2bfa6e

7 years agocmd/go: don't reject ./... matching top-level file outside GOPATH
Ian Lance Taylor [Wed, 25 Jan 2017 14:25:17 +0000 (06:25 -0800)]
cmd/go: don't reject ./... matching top-level file outside GOPATH

This unwinds a small part of CL 31668: we now accept "./." in cleanImport.

Fixes #18778.

Change-Id: Ia7f1fde1cafcea3cc9e0b597a95a0e0bb410a3ed
Reviewed-on: https://go-review.googlesource.com/35646
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
7 years agodatabase/sql: fix race when canceling queries immediately
Daniel Theophanes [Sat, 21 Jan 2017 01:12:50 +0000 (17:12 -0800)]
database/sql: fix race when canceling queries immediately

Previously the following could happen, though in practice it would
be rare.

Goroutine 1:
(*Tx).QueryContext begins a query, passing in userContext

Goroutine 2:
(*Tx).awaitDone starts to wait on the context derived from the passed in context

Goroutine 1:
(*Tx).grabConn returns a valid (*driverConn)
The (*driverConn) passes to (*DB).queryConn

Goroutine 3:
userContext is canceled

Goroutine 2:
(*Tx).awaitDone unblocks and calls (*Tx).rollback
(*driverConn).finalClose obtains dc.Mutex
(*driverConn).finalClose sets dc.ci = nil

Goroutine 1:
(*DB).queryConn obtains dc.Mutex in withLock
ctxDriverPrepare accepts dc.ci which is now nil
ctxCriverPrepare panics on the nil ci

The fix for this is to guard the Tx methods with a RWLock
holding it exclusivly when closing the Tx and holding a read lock
when executing a query.

Fixes #18719

Change-Id: I37aa02c37083c9793dabd28f7f934a1c5cbc05ea
Reviewed-on: https://go-review.googlesource.com/35550
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
7 years agogo/printer: fix format with leading comments in composite literal
Robert Griesemer [Wed, 25 Jan 2017 23:05:39 +0000 (15:05 -0800)]
go/printer: fix format with leading comments in composite literal

This fix is less pervasive than it seems. The only change affecting
formatting is on printer.go:760. The remaining changes have no effect
on formatting since the value of p.level is ignored except on this
specific line.

The remaining changes are:
- renamed adjBlock to funcBody since that's how it is used
- introduced new printer field 'level' tracking the composite
  literal nesting level
- update/restore the composite literal nesting level as needed

Fixes #18782.

Change-Id: Ie833a9b5a559c4ec0f2eef2c5dc97aa263dca53a
Reviewed-on: https://go-review.googlesource.com/35811
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
7 years agoruntime: reorder modules so main.main comes first
David Crawshaw [Wed, 25 Jan 2017 04:19:36 +0000 (20:19 -0800)]
runtime: reorder modules so main.main comes first

Modules appear in the moduledata linked list in the order they are
loaded by the dynamic loader, with one exception: the
firstmoduledata itself the module that contains the runtime.
This is not always the first module (when using -buildmode=shared,
it is typically libstd.so, the second module).

The order matters for typelinksinit, so we swap the first module
with whatever module contains the main function.

Updates #18729

This fixes the test case extracted with -linkshared, and now

go test -linkshared encoding/...

passes. However the original issue about a plugin failure is not
yet fixed.

Change-Id: I9f399ecc3518e22e6b0a350358e90b0baa44ac96
Reviewed-on: https://go-review.googlesource.com/35644
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
7 years agodatabase/sql: let tests wait for db pool to come to expected state
Daniel Theophanes [Wed, 25 Jan 2017 16:27:45 +0000 (08:27 -0800)]
database/sql: let tests wait for db pool to come to expected state

Slower builders were failing TestQueryContext because the cancel
and return to conn pool happens async. TestQueryContext already
uses a wait method for this reason. Use the same method for
other context tests.

Fixes #18759

Change-Id: I84cce697392b867e4ebdfadd38027a06ca14655f
Reviewed-on: https://go-review.googlesource.com/35750
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

7 years agodoc: update gccgo docs
Ian Lance Taylor [Tue, 24 Jan 2017 17:32:29 +0000 (09:32 -0800)]
doc: update gccgo docs

Update docs on correspondence between Go releases and GCC releases.

Update C type that corresponds to Go type `int`.

Drop out of date comments about Ubuntu and RTEMS.

Change-Id: Ic1b5ce9f242789af23ec3b7e7a64c9d257d6913e
Reviewed-on: https://go-review.googlesource.com/35631
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>