]> Cypherpunks.ru repositories - gostls13.git/log
gostls13.git
4 years ago[release-branch.go1.12] go1.12.13 go1.12.13
Andrew Bonventre [Thu, 31 Oct 2019 21:55:55 +0000 (17:55 -0400)]
[release-branch.go1.12] go1.12.13

Change-Id: Ic4db4625c4b7031aa08cb235f526267058a50430
Reviewed-on: https://go-review.googlesource.com/c/go/+/204641
Run-TryBot: Andrew Bonventre <andybons@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
4 years ago[release-branch.go1.12] doc: document Go 1.12.13
Andrew Bonventre [Thu, 31 Oct 2019 21:14:33 +0000 (17:14 -0400)]
[release-branch.go1.12] doc: document Go 1.12.13

Change-Id: Ic65a74e56320adbd76aeef1cf3b19d7906ffe8fe
Reviewed-on: https://go-review.googlesource.com/c/go/+/204639
Run-TryBot: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

4 years ago[release-branch.go1.12] go1.12.12 go1.12.12
Alexander Rakoczy [Thu, 17 Oct 2019 21:07:36 +0000 (17:07 -0400)]
[release-branch.go1.12] go1.12.12

Change-Id: I3494e831beac93e322788f7bd76948b52f769f37
Reviewed-on: https://go-review.googlesource.com/c/go/+/201822
Run-TryBot: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
4 years ago[release-branch.go1.12] doc: document Go 1.12.12
Alexander Rakoczy [Thu, 17 Oct 2019 20:48:37 +0000 (16:48 -0400)]
[release-branch.go1.12] doc: document Go 1.12.12

Change-Id: I832ba5f32d513b586bb0b02371231786b25631e3
Reviewed-on: https://go-review.googlesource.com/c/go/+/201817
Reviewed-by: Andrew Bonventre <andybons@golang.org>
(cherry picked from commit 58e8f7897a0b69fee891af8461e1270d59f4d1a6)
Reviewed-on: https://go-review.googlesource.com/c/go/+/201821

4 years ago[release-branch.go1.12] all: merge release-branch.go1.12-security into release-branch...
Katie Hockman [Thu, 17 Oct 2019 19:20:29 +0000 (15:20 -0400)]
[release-branch.go1.12] all: merge release-branch.go1.12-security into release-branch.go1.12

Change-Id: Ied19fb5f182670c9dc3bd15327d461b203187cf6

4 years ago[release-branch.go1.12-security] go1.12.11 go1.12.11
Katie Hockman [Thu, 17 Oct 2019 16:38:18 +0000 (12:38 -0400)]
[release-branch.go1.12-security] go1.12.11

Change-Id: I8421754104cb795270dbcb6f554ed3a78a719483
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/575988
Reviewed-by: Filippo Valsorda <valsorda@google.com>
4 years ago[release-branch.go1.12-security] doc: document Go 1.12.11
Katie Hockman [Thu, 17 Oct 2019 14:50:53 +0000 (10:50 -0400)]
[release-branch.go1.12-security] doc: document Go 1.12.11

Change-Id: I73f27924046a0a2493330ddc732d1a2fd3f730a5
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/575981
Reviewed-by: Filippo Valsorda <valsorda@google.com>
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/575985

4 years ago[release-branch.go1.12-security] crypto/dsa: prevent bad public keys from causing...
Katie Hockman [Mon, 14 Oct 2019 20:42:21 +0000 (16:42 -0400)]
[release-branch.go1.12-security] crypto/dsa: prevent bad public keys from causing panic

dsa.Verify might currently use a nil s inverse in a
multiplication if the public key contains a non-prime Q,
causing a panic. Change this to check that the mod
inverse exists before using it.

Fixes CVE-2019-17596

Change-Id: I94d5f3cc38f1b5d52d38dcb1d253c71b7fd1cae7
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/572809
Reviewed-by: Filippo Valsorda <valsorda@google.com>
(cherry picked from commit 9119dfb0511326d4485b248b83d4fde19c95d0f7)
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/575232

4 years ago[release-branch.go1.12] cmd/vendor/golang.org/x/arch/arm64/arm64asm: recognise new...
Bryan C. Mills [Wed, 9 Oct 2019 16:17:55 +0000 (12:17 -0400)]
[release-branch.go1.12] cmd/vendor/golang.org/x/arch/arm64/arm64asm: recognise new ssbb/pssbb mnemonics from objdump

This patches in CL 136455 from the 'arch' repo.

Commands run:
~/go/src/cmd$ GOPATH=$(../../bin/go env GOROOT) govendor fetch golang.org/x/arch/arm64/arm64asm@b19384d3c130858bb31a343ea8fce26be71b5998

Updates #27754
Fixes #31305

Change-Id: I8fcc3bc3c718cf0d93afbd1d383df48316b522d4
Reviewed-on: https://go-review.googlesource.com/136455
Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/200057
Run-TryBot: Bryan C. Mills <bcmills@google.com>

4 years agoruntime: fix GDB tests on s390x running Ubuntu 18.04
Michael Munday [Thu, 28 Mar 2019 12:05:43 +0000 (08:05 -0400)]
runtime: fix GDB tests on s390x running Ubuntu 18.04

On Ubuntu 18.04 I am seeing GDB fail to restore the stack pointer
during this test because stack unwinding can't find the PC. This CL
is essentially a partial revert of CL 23940 and fixes the issue on
s390x.

Fixes #33757

Change-Id: Ib4c41162dc85dc882eb6e248330f4082c3fa94c3
Reviewed-on: https://go-review.googlesource.com/c/go/+/169857
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
(cherry picked from commit d91f7e6637cc96029cd5a360a0a74153b39a3ae6)
Reviewed-on: https://go-review.googlesource.com/c/go/+/200039
Run-TryBot: Katie Hockman <katie@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Michael Munday <mike.munday@ibm.com>
4 years ago[release-branch.go1.12] cmd/go/internal/modfetch: update TestCodeRepo for gopkg.in...
Tobias Klauser [Thu, 3 Oct 2019 08:06:08 +0000 (10:06 +0200)]
[release-branch.go1.12] cmd/go/internal/modfetch: update TestCodeRepo for gopkg.in/yaml.v2 again

Update the expected data to fix the longtest builder.

Updates #28856

Change-Id: I7fb6ee72e8469d974561b4b4057f40142f5b3654
Reviewed-on: https://go-review.googlesource.com/c/go/+/198557
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
(cherry picked from commit 64785bf96c5942e5e2a3d326b48eae4e7b189e03)
Reviewed-on: https://go-review.googlesource.com/c/go/+/198700
Run-TryBot: Bryan C. Mills <bcmills@google.com>
(cherry picked from commit 17a492fdd5560a1b6e640a47a9ca83d2853341df)
Reviewed-on: https://go-review.googlesource.com/c/go/+/200038

4 years ago[release-branch.go1.12] cmd/go/internal/{modconv,modfetch,modload}: set modfetch...
Bryan C. Mills [Tue, 12 Mar 2019 19:43:16 +0000 (15:43 -0400)]
[release-branch.go1.12] cmd/go/internal/{modconv,modfetch,modload}: set modfetch proxy URL in tests

Updates #30571
Fixes #34789

Change-Id: Id4c74e83ee58a080d1c2894ae5ebdbf4aeb1ce42
Reviewed-on: https://go-review.googlesource.com/c/go/+/167084
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit bd680d94a030962efbdb20a51eb19e50ba286e56)
Reviewed-on: https://go-review.googlesource.com/c/go/+/200037

4 years ago[release-branch.go1.12] cmd/go: clear GOPROXY in TestGoGetInsecure
Bryan C. Mills [Tue, 5 Mar 2019 22:01:19 +0000 (17:01 -0500)]
[release-branch.go1.12] cmd/go: clear GOPROXY in TestGoGetInsecure

TestGoGetInsecure verifies that 'go get -insecure' can fetch a
particular package. However, the GOPROXY protocol does not provide a
means for proxies to indicate packages as insecure; thus, proxies
cannot safely serve those packages.

This also squashes the typo fix from CL 167086.

Updates #30571
Fixes #33758

Change-Id: I447776dff98bd8ee6eb5055b897b9c7d293e3423
Reviewed-on: https://go-review.googlesource.com/c/go/+/165745
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/c/go/+/199820
Run-TryBot: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
4 years ago[release-branch.go1.12] net: avoid an infinite loop in LookupAddr
Brad Fitzpatrick [Wed, 2 Oct 2019 20:59:27 +0000 (20:59 +0000)]
[release-branch.go1.12] net: avoid an infinite loop in LookupAddr

If a request for a PTR record returned a response with a non-PTR
answer, goLookupPTR would loop forever.  Skipping non-PTR answers
guarantees progress through the DNS response.

Fixes #34661
Updates #34660

Change-Id: Ib5e5263243bc34b9e2f85aa2b913c9cd50dbcaa5
Reviewed-on: https://go-review.googlesource.com/c/go/+/198497
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
4 years ago[release-branch.go1.12] all: merge release-branch.go1.12-security into release-branch...
Filippo Valsorda [Thu, 26 Sep 2019 16:27:30 +0000 (12:27 -0400)]
[release-branch.go1.12] all: merge release-branch.go1.12-security into release-branch.go1.12

Change-Id: I6c822dfc305d629022c7da21ab399367bf021cf7

4 years ago[release-branch.go1.12-security] go1.12.10 go1.12.10
Filippo Valsorda [Wed, 25 Sep 2019 17:34:06 +0000 (13:34 -0400)]
[release-branch.go1.12-security] go1.12.10

Change-Id: I64d76a35ad113110cb83117c6ce5d4d923d93c93
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/558789
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
4 years ago[release-branch.go1.12-security] doc: document Go 1.12.10
Filippo Valsorda [Wed, 25 Sep 2019 15:18:50 +0000 (11:18 -0400)]
[release-branch.go1.12-security] doc: document Go 1.12.10

Change-Id: If694ce529393b8ae9c6c55270665efc3a108a3b2
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/558778
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/558784

4 years ago[release-branch.go1.12-security] net/textproto: don't normalize headers with spaces...
Filippo Valsorda [Thu, 12 Sep 2019 16:37:36 +0000 (12:37 -0400)]
[release-branch.go1.12-security] net/textproto: don't normalize headers with spaces before the colon

RFC 7230 is clear about headers with a space before the colon, like

X-Answer : 42

being invalid, but we've been accepting and normalizing them for compatibility
purposes since CL 5690059 in 2012.

On the client side, this is harmless and indeed most browsers behave the same
to this day. On the server side, this becomes a security issue when the
behavior doesn't match that of a reverse proxy sitting in front of the server.

For example, if a WAF accepts them without normalizing them, it might be
possible to bypass its filters, because the Go server would interpret the
header differently. Worse, if the reverse proxy coalesces requests onto a
single HTTP/1.1 connection to a Go server, the understanding of the request
boundaries can get out of sync between them, allowing an attacker to tack an
arbitrary method and path onto a request by other clients, including
authentication headers unknown to the attacker.

This was recently presented at multiple security conferences:
https://portswigger.net/blog/http-desync-attacks-request-smuggling-reborn

net/http servers already reject header keys with invalid characters.
Simply stop normalizing extra spaces in net/textproto, let it return them
unchanged like it does for other invalid headers, and let net/http enforce
RFC 7230, which is HTTP specific. This loses us normalization on the client
side, but there's no right answer on the client side anyway, and hiding the
issue sounds worse than letting the application decide.

Fixes CVE-2019-16276

Change-Id: I6d272de827e0870da85d93df770d6a0e161bbcf1
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/549719
Reviewed-by: Brad Fitzpatrick <bradfitz@google.com>
(cherry picked from commit 1280b868e82bf173ea3e988be3092d160ee66082)
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/558776
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
4 years ago[release-branch.go1.12] syscall: on AIX use nsendmsg and nrecvmsg, define SockaddrDat...
Clément Chigot [Wed, 3 Apr 2019 11:58:57 +0000 (13:58 +0200)]
[release-branch.go1.12] syscall: on AIX use nsendmsg and nrecvmsg, define SockaddrDatalink

This commit changes sendmsg, recvmsg to use nsendmsg, nrecvmsg on AIX.
These syscalls support the new msghdr structure (with Control
and Controllen) which is needed for golang.org/x/net.
Also define SockaddrDataLink.

Fixes #33982

Change-Id: I233fbd24f9eb86648e0d4d50c2b56da3626292d0
Reviewed-on: https://go-review.googlesource.com/c/go/+/170537
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
(cherry picked from commit e014184c438699b1637b1d623492f33669105002)
Reviewed-on: https://go-review.googlesource.com/c/go/+/193608
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
4 years ago[release-branch.go1.12] doc: align documents link
obei [Wed, 21 Aug 2019 17:55:20 +0000 (23:25 +0530)]
[release-branch.go1.12] doc: align documents link

Updates #33738

Change-Id: If0856d7c57ecfde08341c1aecb5e92361fd64f2b
Reviewed-on: https://go-review.googlesource.com/c/go/+/191217
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Run-TryBot: Andrew Bonventre <andybons@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit cded9f43f8d504159d9b71ddca7fe8abd8ba78b0)
Reviewed-on: https://go-review.googlesource.com/c/go/+/191748
Reviewed-by: Katie Hockman <katie@golang.org>
4 years ago[release-branch.go1.12] go1.12.9 go1.12.9
Dmitri Shuralyov [Thu, 15 Aug 2019 18:10:05 +0000 (14:10 -0400)]
[release-branch.go1.12] go1.12.9

Change-Id: I70dc0e2accd83d9c974b95075f9e83a82d89563d
Reviewed-on: https://go-review.googlesource.com/c/go/+/190407
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
4 years ago[release-branch.go1.12] doc: document Go 1.12.9
Dmitri Shuralyov [Thu, 15 Aug 2019 16:57:01 +0000 (12:57 -0400)]
[release-branch.go1.12] doc: document Go 1.12.9

Change-Id: I88b7e085fc70f9c021788d364099f5bc6b705ba8
Reviewed-on: https://go-review.googlesource.com/c/go/+/190438
Reviewed-by: Filippo Valsorda <filippo@golang.org>
(cherry picked from commit 0212f0410f845815f5327a7f2e705891a9598f3d)
Reviewed-on: https://go-review.googlesource.com/c/go/+/190406
Reviewed-by: Alexander Rakoczy <alex@golang.org>
4 years ago[release-branch.go1.12] all: merge release-branch.go1.12-security into release-branch...
Filippo Valsorda [Tue, 13 Aug 2019 17:14:07 +0000 (13:14 -0400)]
[release-branch.go1.12] all: merge release-branch.go1.12-security into release-branch.go1.12

Change-Id: I29801b98d975da0bbc092b16dc9771564a39a10a

4 years ago[release-branch.go1.12-security] go1.12.8 go1.12.8
Dmitri Shuralyov [Tue, 13 Aug 2019 15:42:24 +0000 (11:42 -0400)]
[release-branch.go1.12-security] go1.12.8

Change-Id: I131f93770f9bc5f2d4ee73f158607c1c9e1550bb
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/527000
Reviewed-by: Filippo Valsorda <valsorda@google.com>
4 years ago[release-branch.go1.12-security] doc: document Go 1.12.8 and Go 1.11.13
Dmitri Shuralyov [Tue, 13 Aug 2019 14:27:29 +0000 (10:27 -0400)]
[release-branch.go1.12-security] doc: document Go 1.12.8 and Go 1.11.13

Change-Id: I0daab6cd347e1fc0066e516f02c33f1b63e3f1a3
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/526992
Reviewed-by: Filippo Valsorda <valsorda@google.com>
(cherry picked from commit 685bfb1adec3d9fcb589f35eb2bc0b99d2f84bf0)
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/526993

4 years ago[release-branch.go1.12-security] net/url: make Hostname and Port predictable for...
Filippo Valsorda [Tue, 6 Aug 2019 23:32:16 +0000 (19:32 -0400)]
[release-branch.go1.12-security] net/url: make Hostname and Port predictable for invalid Host values

When Host is not valid per RFC 3986, the behavior of Hostname and Port
was wildly unpredictable, to the point that Host could have a suffix
that didn't appear in neither Hostname nor Port.

This is a security issue when applications are applying checks to Host
and expecting them to be meaningful for the contents of Hostname.

To reduce disruption, this change only aims to guarantee the following
two security-relevant invariants.

* Host is either Hostname or [Hostname] with Port empty, or
  Hostname:Port or [Hostname]:Port.

* Port is only decimals.

The second invariant is the one that's most likely to cause disruption,
but I believe it's important, as it's conceivable an application might
do a suffix check on Host and expect it to be meaningful for the
contents of Hostname (if the suffix is not a valid port).

There are three ways to ensure it.

1) Reject invalid ports in Parse. Note that non-numeric ports are
   already rejected if and only if the host starts with "[".

2) Consider non-numeric ports as part of Hostname, not Port.

3) Allow non-numeric ports, and hope they only flow down to net/http,
   which will reject them (#14353).

This change adopts both 1 and 2. We could do only the latter, but then
these invalid hosts would flow past port checks, like in
http_test.TestTransportRejectsAlphaPort. Non-numeric ports weren't fully
supported anyway, because they were rejected after IPv6 literals, so
this restores consistency. We could do only the former, but at this
point 2) is free and might help with manually constructed Host values
(or if we get something wrong in Parse).

Note that net.SplitHostPort and net.Dial explicitly accept service names
in place of port numbers, but this is an URL package, and RFC 3986,
Section 3.2.3, clearly specifies ports as a number in decimal.

net/http uses a mix of net.SplitHostPort and url.Parse that would
deserve looking into, but in general it seems that it will still accept
service names in Addr fields as they are passed to net.Listen, while
rejecting them in URLs, which feels correct.

This leaves a number of invalid URLs to reject, which however are not
security relevant once the two invariants above hold, so can be done in
Go 1.14: IPv6 literals without brackets (#31024), invalid IPv6 literals,
hostnames with invalid characters, and more.

Tested with 200M executions of go-fuzz and the following Fuzz function.

u, err := url.Parse(string(data))
if err != nil {
return 0
}
h := u.Hostname()
p := u.Port()

switch u.Host {
case h + ":" + p:
return 1
case "[" + h + "]:" + p:
return 1
case h:
fallthrough
case "[" + h + "]":
if p != "" {
panic("unexpected Port()")
}
return 1
}
panic("Host is not a variant of [Hostname]:Port")

Fixes CVE-2019-14809
Updates #29098

Change-Id: I7ef40823dab28f29511329fa2d5a7fb10c3ec895
Reviewed-on: https://go-review.googlesource.com/c/go/+/189258
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit 61bb56ad63992a3199acc55b2537c8355ef887b6)
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/526408
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
4 years ago[release-branch.go1.12-security] net/http: update bundled http2 to import security fix
Filippo Valsorda [Mon, 12 Aug 2019 20:45:15 +0000 (16:45 -0400)]
[release-branch.go1.12-security] net/http: update bundled http2 to import security fix

Apply the following unpublished golang.org/x/net commit.

    commit cdfb69ac37fc6fa907650654115ebebb3aae2087
    Author: Filippo Valsorda <filippo@golang.org>
    Date:   Sun Aug 11 02:12:18 2019 -0400

    [release-branch.go1.12] http2: limit number of control frames in server send queue

    An attacker could cause servers to queue an unlimited number of PING
    ACKs or RST_STREAM frames by soliciting them and not reading them, until
    the program runs out of memory.

    Limit control frames in the queue to a few thousands (matching the limit
    imposed by other vendors) by counting as they enter and exit the scheduler,
    so the protection will work with any WriteScheduler.

    Once the limit is exceeded, close the connection, as we have no way to
    communicate with the peer.

    Change-Id: I842968fc6ed3eac654b497ade8cea86f7267886b
    Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/525552
Reviewed-by: Brad Fitzpatrick <bradfitz@google.com>
    (cherry picked from commit 589ad6cc5321fb68a90370348a241a5da0a2cc80)
    Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/526069
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Fixes CVE-2019-9512 and CVE-2019-9514
Updates #33606

Change-Id: I282b3e0fa22422d9ea0d07f4a3935685ce4a7433
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/526071
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
4 years ago[release-branch.go1.12] cmd/link: increase the function call limit in stkcheck
Ian Lance Taylor [Fri, 9 Aug 2019 17:54:43 +0000 (10:54 -0700)]
[release-branch.go1.12] cmd/link: increase the function call limit in stkcheck

There is real (albeit generated) code that exceeds the limit.

Updates #33555
Fixes #33557

Change-Id: I668e85825d3d2a471970e869abe63f3492213cc1
Reviewed-on: https://go-review.googlesource.com/c/go/+/189697
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
(cherry picked from commit 951143cf1425189965498cc32fc8dc132bf7c777)
Reviewed-on: https://go-review.googlesource.com/c/go/+/189717

4 years ago[release-branch.go1.12] math/big: fix the bug in assembly implementation of shlVU...
erifan01 [Thu, 28 Mar 2019 10:53:42 +0000 (10:53 +0000)]
[release-branch.go1.12] math/big: fix the bug in assembly implementation of shlVU on arm64

For the case where the addresses of parameter z and x of the function
shlVU overlap and the address of z is greater than x, x (input value)
can be polluted during the calculation when the high words of x are
overlapped with the low words of z (output value).

Updates #31084
Fixes #32940

Change-Id: I9bb0266a1d7856b8faa9a9b1975d6f57dece0479
Reviewed-on: https://go-review.googlesource.com/c/go/+/169780
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
(cherry picked from commit 503e6ccd740c48f21c1d159d904b51da2d9a8ca9)
Reviewed-on: https://go-review.googlesource.com/c/go/+/185041
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>

4 years ago[release-branch.go1.12] os: enable the close-on-exec flag for openFdAt
Baokun Lee [Thu, 1 Aug 2019 16:31:57 +0000 (00:31 +0800)]
[release-branch.go1.12] os: enable the close-on-exec flag for openFdAt

There's a race here with fork/exec, enable the close-on-exec flag
for the new file descriptor.

Updates #33405
Fixes #33424

Change-Id: Ib1e405c3b48b11c867f183fd13eff8b73d95e3b4
Reviewed-on: https://go-review.googlesource.com/c/go/+/188537
Run-TryBot: Baokun Lee <nototon@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit 2d6ee6e89a4b30c7528d2977df4e1aa86651e4e4)
Reviewed-on: https://go-review.googlesource.com/c/go/+/188538
Run-TryBot: Ian Lance Taylor <iant@golang.org>

4 years ago[release-branch.go1.12] doc/go1.12: document change in syscall.Setrlimit behavior
Andrew Bonventre [Tue, 30 Jul 2019 21:46:36 +0000 (17:46 -0400)]
[release-branch.go1.12] doc/go1.12: document change in syscall.Setrlimit behavior

Fixes #30401

Change-Id: I7b5035ffc7333c746d4e31563df26ff4f934dfc6
Reviewed-on: https://go-review.googlesource.com/c/go/+/188237
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
(cherry picked from commit fe8a86646478b11db5697108a4db0deeaca29595)
Reviewed-on: https://go-review.googlesource.com/c/go/+/188357

4 years ago[release-branch.go1.12] cmd/link: put shlib ".type" functions in internal ABI
Ian Lance Taylor [Mon, 15 Jul 2019 23:06:49 +0000 (16:06 -0700)]
[release-branch.go1.12] cmd/link: put shlib ".type" functions in internal ABI

These functions are compiler generated, and as such are only available
in the internal ABI. Doing this avoids generating an alias symbol.
Doing that avoids confusion between unmangled and mangled type symbols.

Updates #30768
Fixes #33040

Change-Id: I8aba3934ffa994b1a19fc442cfe3e05642792a25
Reviewed-on: https://go-review.googlesource.com/c/go/+/186278
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
4 years ago[release-branch.go1.12] crypto/tls: remove TestVerifyHostnameResumed
Filippo Valsorda [Mon, 15 Jul 2019 20:45:17 +0000 (16:45 -0400)]
[release-branch.go1.12] crypto/tls: remove TestVerifyHostnameResumed

Session resumption is not a reliable TLS behavior: the server can decide
to reject a session ticket for a number of reasons, or no reason at all.
This makes this non-hermetic test extremely brittle.

It's currently broken on the builders for both TLS 1.2 and TLS 1.3, and
I could reproduce the issue for TLS 1.3 only. As I was debugging it, it
started passing entirely on my machine.

In practice, it doesn't get us any coverage as resumption is already
tested with the recorded exchange tests, and TestVerifyHostname still
provides a smoke test checking that we can in fact talk TLS.

Updates #32978

Change-Id: I63505e22ff7704f25ad700d46e4ff14850ba5d3c
Reviewed-on: https://go-review.googlesource.com/c/go/+/186239
Run-TryBot: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
(cherry-picked from 20e4540e9084528a1b36978882596daa7d8d8800)
Reviewed-on: https://go-review.googlesource.com/c/go/+/186277
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
4 years ago[release-branch.go1.12] go1.12.7 go1.12.7
Alexander Rakoczy [Mon, 8 Jul 2019 19:47:09 +0000 (15:47 -0400)]
[release-branch.go1.12] go1.12.7

Change-Id: I9696d71d6087c469911c6bdc494ce01ac4e52a11
Reviewed-on: https://go-review.googlesource.com/c/go/+/185261
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

4 years ago[release-branch.go1.12] doc: document Go 1.12.7
Alexander Rakoczy [Mon, 8 Jul 2019 18:19:07 +0000 (14:19 -0400)]
[release-branch.go1.12] doc: document Go 1.12.7

Change-Id: Id5d2f4cc6bc310bed2516ce0f50c395802475f66
Reviewed-on: https://go-review.googlesource.com/c/go/+/185258
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
(cherry picked from commit c893ea8f8b5fc824b1fdd0b2e56d0cda5eacb02b)
Reviewed-on: https://go-review.googlesource.com/c/go/+/185146

4 years ago[release-branch.go1.12] doc: document Go 1.11.12
Alexander Rakoczy [Mon, 8 Jul 2019 18:14:17 +0000 (14:14 -0400)]
[release-branch.go1.12] doc: document Go 1.11.12

Change-Id: I1b2e369befc58b3f88ac201442a2d9f76d87d54e
Reviewed-on: https://go-review.googlesource.com/c/go/+/185257
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
(cherry picked from commit 0fddd668671c44a622be7d7ea71962be644d8218)
Reviewed-on: https://go-review.googlesource.com/c/go/+/185145

4 years ago[release-branch.go1.12] cmd/compile: add necessary operand to mergePoint in rewrite...
David Chase [Wed, 19 Jun 2019 22:09:39 +0000 (18:09 -0400)]
[release-branch.go1.12] cmd/compile: add necessary operand to mergePoint in rewrite rules

A missing operand to mergePoint caused lower to place values
in the wrong blocks.

Includes test, belt+suspenders to do both ssa check and verify
the output (was is how the bug was originally observed).

The fixed bug here is very likely present in Go versions
1.9-1.12 on amd64 and s390x

Updates #32680.
Fixes #32712.

Change-Id: I63e702c4c40602cb795ef71b1691eb704d38ccc7
Reviewed-on: https://go-review.googlesource.com/c/go/+/183059
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
(cherry picked from commit 769fda2d5110eef6146d7df3bf0219872c9b0da6)
Reviewed-on: https://go-review.googlesource.com/c/go/+/183241

4 years ago[release-branch.go1.12] cmd/link: revise previous __DWARF segment protection fix
Than McIntosh [Thu, 20 Jun 2019 13:02:05 +0000 (09:02 -0400)]
[release-branch.go1.12] cmd/link: revise previous __DWARF segment protection fix

Tweak the previous fix for issue 32673 (in CL 182958) to work around
problems with c-shared build mode that crop up on some of the builders
(10.11, 10.12).  We now consistently set vmaddr and vmsize to zero
for the DWARF segment regardless of build mode.

Fixes #32697

Change-Id: Id1fc213590ad00c28352925e2d754d760e022b5e
Reviewed-on: https://go-review.googlesource.com/c/go/+/183237
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/183398
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

4 years ago[release-branch.go1.12] cmd/link: macos: set initial protection of 0 for __DWARF...
Than McIntosh [Wed, 19 Jun 2019 17:33:33 +0000 (13:33 -0400)]
[release-branch.go1.12] cmd/link: macos: set initial protection of 0 for __DWARF segment

For later versions of MacOS, the dynamic loader is more picky about
enforcing restrictions on __DWARF MachO load commands/segments,
triggering aborts of the form

  dyld: malformed mach-o image: segment __DWARF has vmsize < filesize

for Go programs that use cgo on Darwin. The error is being triggered
because the Go linker is setting "vmsize" in the DWARF segment entry
to zero as a way to signal that the DWARF doesn't need to be mapped
into memory at runtime (which we need to continue to do).

This patch changes the initial protection on the __DWARF segment to
zero, which dyld seems to be happy with (this is used for other similar
non-loadable sections such as __LLVM).

Updates #32697

Change-Id: I9a73449c6d26c172f3d70361719943af381f37e6
Reviewed-on: https://go-review.googlesource.com/c/go/+/182958
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/183397

4 years ago[release-branch.go1.12] cmd/compile: fix range analysis of small signed integers
Matthew Dempsky [Wed, 12 Jun 2019 02:52:58 +0000 (19:52 -0700)]
[release-branch.go1.12] cmd/compile: fix range analysis of small signed integers

For int8, int16, and int32, comparing their unsigned value to MaxInt64
to determine non-negativity doesn't make sense, because they have
negative values whose unsigned representation is smaller than that.
Fix is simply to compare with the appropriate upper bound based on the
value type's size.

Fixes #32583.

Change-Id: Ie7afad7a56af92bd890ba5ff33c86d1df06cfd9a
Reviewed-on: https://go-review.googlesource.com/c/go/+/181797
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit f44404ebbfeff57f3e45ebf4b314a320bb89841f)
Reviewed-on: https://go-review.googlesource.com/c/go/+/181978
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
4 years ago[release-branch.go1.12] cmd/cgo: fix inappropriate array copy
Ian Lance Taylor [Mon, 24 Jun 2019 20:17:30 +0000 (13:17 -0700)]
[release-branch.go1.12] cmd/cgo: fix inappropriate array copy

Ensure that during rewriting of expressions that take the address of
an array, that we properly recognize *ast.IndexExpr as an operation
to create a pointer variable and thus assign the proper addressOf
and deference operators as "&" and "*" respectively.

This fixes a regression from CL 142884.

This is a backport of CLs 183458 and 183778 to the 1.12 release branch.
It is not a cherry pick because the code in misc/cgo/test has changed.

Updates #32579
Fixes #32756

Change-Id: I0daa75ec62cccbe82ab658cb2947f51423e0c235
Reviewed-on: https://go-review.googlesource.com/c/go/+/183627
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
4 years ago[release-branch.go1.12] go1.12.6 go1.12.6
Dmitri Shuralyov [Tue, 11 Jun 2019 14:18:46 +0000 (10:18 -0400)]
[release-branch.go1.12] go1.12.6

Change-Id: If156d9582ad5d76589e83ac00b4fa7f3b61f1502
Reviewed-on: https://go-review.googlesource.com/c/go/+/181658
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
4 years ago[release-branch.go1.12] doc: document Go 1.12.6
Dmitri Shuralyov [Mon, 10 Jun 2019 22:02:43 +0000 (18:02 -0400)]
[release-branch.go1.12] doc: document Go 1.12.6

Change-Id: I8ae00d2392c20c627d58cf7e79015e982b971802
Reviewed-on: https://go-review.googlesource.com/c/go/+/181551
Reviewed-by: Filippo Valsorda <filippo@golang.org>
(cherry picked from commit ef84fa082caec4d1757377c11e98f3b5ebc934d3)
Reviewed-on: https://go-review.googlesource.com/c/go/+/181598

4 years ago[release-branch.go1.12] doc: document Go 1.11.11
Dmitri Shuralyov [Mon, 10 Jun 2019 22:02:33 +0000 (18:02 -0400)]
[release-branch.go1.12] doc: document Go 1.11.11

Change-Id: I1c3e3305dfee4545a6caedd48243770ab3b28277
Reviewed-on: https://go-review.googlesource.com/c/go/+/181550
Reviewed-by: Filippo Valsorda <filippo@golang.org>
(cherry picked from commit 55453016979124e18d3afb53c9df1590877a3b53)
Reviewed-on: https://go-review.googlesource.com/c/go/+/181552

4 years ago[release-branch.go1.12] cmd/link: fix deferreturn detector
Keith Randall [Fri, 7 Jun 2019 17:22:53 +0000 (13:22 -0400)]
[release-branch.go1.12] cmd/link: fix deferreturn detector

The logic for detecting deferreturn calls is wrong.

We used to look for a relocation whose symbol is runtime.deferreturn
and has an offset of 0. But on some architectures, the relocation
offset is not zero. These include arm (the offset is 0xebfffffe) and
s390x (the offset is 6).

This ends up setting the deferreturn offset at 0, so we end up using
the entry point live map instead of the deferreturn live map in a
frame which defers and then segfaults.

Instead, use the IsDirectJump helper to find calls.

Fixes #32484

Change-Id: Iecb530a7cf6eabd7233be7d0731ffa78873f3a54
Reviewed-on: https://go-review.googlesource.com/c/go/+/181258
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
(cherry picked from commit 9eb403159da9debbb4881140995e62bec0c943f3)
Reviewed-on: https://go-review.googlesource.com/c/go/+/181262
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>

4 years ago[release-branch.go1.12] cmd/go: accept -Wl,-R/path/
Jason A. Donenfeld [Sun, 9 Jun 2019 12:02:54 +0000 (14:02 +0200)]
[release-branch.go1.12] cmd/go: accept -Wl,-R/path/

This is a backport of CL 178397.

Updates #32167
Fixes #32168

Change-Id: Idb16a01d56814ea09ad277798787355dc6a3121f
Reviewed-on: https://go-review.googlesource.com/c/go/+/181437
Reviewed-by: Jason Donenfeld <Jason@zx2c4.com>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Run-TryBot: Jason Donenfeld <Jason@zx2c4.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

4 years ago[release-branch.go1.12] cmd/go: force -coverpkg main packages to be built as libraries
Jay Conrod [Fri, 10 May 2019 15:49:08 +0000 (11:49 -0400)]
[release-branch.go1.12] cmd/go: force -coverpkg main packages to be built as libraries

This fixes TestScript/cover_pkgall_multiple_mains, which started
failing after CL 174657.

When compiling main packages with coverage instrumentation
(e.g., for -coverpkg all), we now pass -p with the full import path
instead of '-p main'. This avoids link errors
'duplicate symbol main.main (types 1 and 1)'.

Fixes #32295
Updates #31946
Updates #32150

Change-Id: Id147527b1dbdc14bb33ac133c30d50c250b4365c
Reviewed-on: https://go-review.googlesource.com/c/go/+/176558
Run-TryBot: Jay Conrod <jayconrod@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit 3b8c804164e26bdec6ca94a5ab1b5c35fa119e5e)
Reviewed-on: https://go-review.googlesource.com/c/go/+/179677

4 years ago[release-branch.go1.12] net/http: prevent Transport from spamming stderr on server...
Brad Fitzpatrick [Wed, 29 May 2019 21:49:20 +0000 (21:49 +0000)]
[release-branch.go1.12] net/http: prevent Transport from spamming stderr on server 408 reply

HTTP 408 responses now exist and are seen in the wild (e.g. from
Google's GFE), so make Go's HTTP client not spam about them when seen.
They're normal (now).

Fixes #32367
Updates #32310

Change-Id: I558eb4654960c74cf20db1902ccaae13d03310f6
Reviewed-on: https://go-review.googlesource.com/c/go/+/179457
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
(cherry picked from commit ba66d89d7882892f762e7980562287d2c79ad87e)
Reviewed-on: https://go-review.googlesource.com/c/go/+/181239
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
4 years ago[release-branch.go1.12] crypto/x509: fix value ownership in isSSLPolicy on macOS
Filippo Valsorda [Tue, 21 May 2019 18:54:54 +0000 (14:54 -0400)]
[release-branch.go1.12] crypto/x509: fix value ownership in isSSLPolicy on macOS

CFDictionaryGetValueIfPresent does not take ownership of the value, so
releasing the properties dictionary before passing the value to CFEqual
can crash. Not really clear why this works most of the time.

See https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html

Fixes #32282
Updates #28092
Updates #30763

Change-Id: I5ee7ca276b753a48abc3aedfb78b8af68b448dd4
Reviewed-on: https://go-review.googlesource.com/c/go/+/178537
Reviewed-by: Adam Langley <agl@golang.org>
(cherry picked from commit a3d4655c2435e3777c45f09650539b943bab1c66)
Reviewed-on: https://go-review.googlesource.com/c/go/+/179339
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
5 years ago[release-branch.go1.12] os: pass correct environment when creating Windows processes
Jason A. Donenfeld [Sun, 12 May 2019 12:34:30 +0000 (14:34 +0200)]
[release-branch.go1.12] os: pass correct environment when creating Windows processes

This is CVE-2019-11888.

Previously, passing a nil environment but a non-nil token would result
in the new potentially unprivileged process inheriting the parent
potentially privileged environment, or would result in the new
potentially privileged process inheriting the parent potentially
unprivileged environment. Either way, it's bad. In the former case, it's
an infoleak. In the latter case, it's a possible EoP, since things like
PATH could be overwritten.

Not specifying an environment currently means, "use the existing
environment". This commit amends the behavior to be, "use the existing
environment of the token the process is being created for." The behavior
therefore stays the same when creating processes without specifying a
token. And it does the correct thing when creating processes when
specifying a token.

Updates #32000
Fixes #32081

Change-Id: Ib4a90cfffb6ba866c855f66f1313372fdd34ce41
Reviewed-on: https://go-review.googlesource.com/c/go/+/177538
Run-TryBot: Jason Donenfeld <Jason@zx2c4.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
5 years ago[release-branch.go1.12] cmd/compile: make sure to initialize static entries of slices
Keith Randall [Mon, 13 May 2019 20:43:49 +0000 (13:43 -0700)]
[release-branch.go1.12] cmd/compile: make sure to initialize static entries of slices

If a slice's entries are sparse, we decide to initialize it dynamically
instead of statically. That's CL 151319.

But if we do initialize it dynamically, we still need to initialize
the static entries. Typically we do that, but the bug fixed here is
that we don't if the entry's value is itself an array or struct.

To fix, use initKindLocalCode to ensure that both static and
dynamic entries are initialized via code.

Fixes #32013

Change-Id: I1192ffdbfb5cd50445c1206c4a3d8253295201dd
Reviewed-on: https://go-review.googlesource.com/c/go/+/176904
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
(cherry picked from commit a9e107c85cf69d735ac81c29f4a354643e40b2b5)
Reviewed-on: https://go-review.googlesource.com/c/go/+/177040
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
5 years ago[release-branch.go1.12] cmd/link/internal/ld: bump macOS and macOS SDK version to...
Elias Naur [Wed, 8 May 2019 07:36:07 +0000 (09:36 +0200)]
[release-branch.go1.12] cmd/link/internal/ld: bump macOS and macOS SDK version to 10.9

Satisfies the Apple Notary.

Fixes #30526

Change-Id: I91cf2d706a3ebe79bafdb759a0d32266ed6b9096
Reviewed-on: https://go-review.googlesource.com/c/go/+/175918
Run-TryBot: Elias Naur <mail@eliasnaur.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-on: https://go-review.googlesource.com/c/go/+/175919
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
5 years ago[release-branch.go1.12] go1.12.5 go1.12.5
Andrew Bonventre [Mon, 6 May 2019 20:28:36 +0000 (16:28 -0400)]
[release-branch.go1.12] go1.12.5

Change-Id: Ib253d4aafab3ad65b4ba666f4eeb8b2f245997a1
Reviewed-on: https://go-review.googlesource.com/c/go/+/175447
Run-TryBot: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

5 years ago[release-branch.go1.12] cmd/go/internal/imports: use the full path to resolve symlinks
Bryan C. Mills [Thu, 21 Feb 2019 17:00:12 +0000 (12:00 -0500)]
[release-branch.go1.12] cmd/go/internal/imports: use the full path to resolve symlinks

info.Name returns a name relative to the directory, so we need to
prefix that directory in the Stat call.

(This was missed in CL 141097 due to the fact that the test only
happened to check symlinks in the current directory.)

This allows the misc/ tests to work in module mode on platforms that
support symlinks.

Updates #30228
Updates #28107
Fixes #31763

Change-Id: Ie31836382df0cbd7d203b7a8b637c4743d68b6f3
Reviewed-on: https://go-review.googlesource.com/c/163517
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/175441
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
5 years ago[release-branch.go1.12] doc: document Go 1.12.5
Andrew Bonventre [Mon, 6 May 2019 19:56:43 +0000 (15:56 -0400)]
[release-branch.go1.12] doc: document Go 1.12.5

Change-Id: I9986a323db2a8f5fa74b071cfd04e8c786da0cb3
Reviewed-on: https://go-review.googlesource.com/c/go/+/175438
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit 1560264f70a90de8d8b68e246c476d79e4d60574)
Reviewed-on: https://go-review.googlesource.com/c/go/+/175444
Reviewed-by: Andrew Bonventre <andybons@golang.org>
5 years ago[release-branch.go1.12] doc: document Go 1.11.10
Andrew Bonventre [Mon, 6 May 2019 19:59:07 +0000 (15:59 -0400)]
[release-branch.go1.12] doc: document Go 1.11.10

Change-Id: Icca4495f727e3921b717a4bbb441cd832d321d46
Reviewed-on: https://go-review.googlesource.com/c/go/+/175439
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit e1f9e701be094741b234320cc49b8776cce27c3f)
Reviewed-on: https://go-review.googlesource.com/c/go/+/175443
Reviewed-by: Andrew Bonventre <andybons@golang.org>
5 years ago[release-branch.go1.12] cmd/go/internal/get: fix strayed verbose output on stdout
Hana Kim [Wed, 1 May 2019 16:07:23 +0000 (12:07 -0400)]
[release-branch.go1.12] cmd/go/internal/get: fix strayed verbose output on stdout

Fixes #31783

Change-Id: I3cc0ebc4be34d7c2d2d4fd655bfd0c2515ff3021
Reviewed-on: https://go-review.googlesource.com/c/go/+/174739
Reviewed-by: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit fad365ba924291ce9994cb382191fc610984ed79)
Reviewed-on: https://go-review.googlesource.com/c/go/+/175419
Run-TryBot: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
5 years ago[release-branch.go1.12] cmd/compile: use correct package name for stack object symbol
Keith Randall [Wed, 10 Apr 2019 23:44:46 +0000 (16:44 -0700)]
[release-branch.go1.12] cmd/compile: use correct package name for stack object symbol

Stack object generation code was always using the local package name
for its symbol. Normally that doesn't matter, as we usually only
compile functions in the local package. But for wrappers, the compiler
generates functions which live in other packages. When there are two
other packages with identical functions to wrap, the same name appears
twice, and the compiler goes boom.

Fixes #31396

Change-Id: I7026eebabe562cb159b8b6046cf656afd336ba25
Reviewed-on: https://go-review.googlesource.com/c/go/+/171464
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
(cherry picked from commit 43001a0dc96a29f662f2782c5fb3ca998eadd623)
Reviewed-on: https://go-review.googlesource.com/c/go/+/173317
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
5 years ago[release-branch.go1.12] cmd/vet: add tests for point-release issues
Russ Cox [Tue, 30 Apr 2019 17:32:57 +0000 (13:32 -0400)]
[release-branch.go1.12] cmd/vet: add tests for point-release issues

Add explicit tests for:

 #30465 cmd/vet: Consider reverting tag conflict for embedded fields
 #30399 cmd/vet: possible to get a printf false positive with big.Int

because we have managed not to fix them in the last
couple point releases, and it will be too embarrassing
to do that yet again.

Change-Id: Ib1da5df870348b6eb9bfc8a87c507ecc6d44b8dd
Reviewed-on: https://go-review.googlesource.com/c/go/+/174520
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
5 years ago[release-branch.go1.12] cmd/vendor/golang.org/x/tools/go/analysis: update from releas...
Russ Cox [Tue, 30 Apr 2019 17:24:34 +0000 (13:24 -0400)]
[release-branch.go1.12] cmd/vendor/golang.org/x/tools/go/analysis: update from release-branch.go1.12

$ ./update-xtools.sh
Copied /Users/rsc/src/golang.org/x/tools@aa829657 to .
$ cd ~/src/golang.org/x/tools
$ git log -n1 aa829657
commit aa82965741a9fecd12b026fbb3d3c6ed3231b8f8 (HEAD -> release-branch.go1.12, origin/release-branch.go1.12)
Author:     Daniel MartĂ­ <mvdan@mvdan.cc>
AuthorDate: Fri Mar 1 11:00:19 2019 +0000
Commit:     Brad Fitzpatrick <bradfitz@golang.org>
CommitDate: Wed Mar 13 21:06:03 2019 +0000
...
$

Picks up cmd/vet fixes that have been inadvertently missed in point releases so far.

Fixes #30399.
Fixes #30465.

Change-Id: Ibcfaac51d134205b986b32f857d54006b19c896a
Reviewed-on: https://go-review.googlesource.com/c/go/+/174519
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
5 years agoRevert "runtime: scavenge memory upon allocating from scavenged memory"
Michael Knyszek [Fri, 26 Apr 2019 15:53:44 +0000 (15:53 +0000)]
Revert "runtime: scavenge memory upon allocating from scavenged memory"

This reverts commit 8e093e7a1cd8a092f23717cb8f34bca489a3eee5
(CL 159500).

Reason for revert: Increases memory allocation latency in certain
situations.

Fixes #31679.

Change-Id: I15e02c53a58009fd907b619b8649de2cdeb29ef0
Reviewed-on: https://go-review.googlesource.com/c/go/+/174102
Run-TryBot: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Austin Clements <austin@google.com>
5 years ago[release-branch.go1.12] runtime: make mTreap.find actually find the best fit
Michael Anthony Knyszek [Tue, 23 Apr 2019 18:57:16 +0000 (18:57 +0000)]
[release-branch.go1.12] runtime: make mTreap.find actually find the best fit

This change modifies the implementation of mTreap.find to find the
best-fit span with the lowest possible base address.

Fixes #31677.

Change-Id: Ib4bda0f85d7d0590326f939a243a6e4665f37d3f
Reviewed-on: https://go-review.googlesource.com/c/go/+/173479
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
(cherry picked from commit 8c05d67661c966f5130e51ca685b0c70a5a929ff)
Reviewed-on: https://go-review.googlesource.com/c/go/+/173939
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
5 years agoruntime: add tests for runtime mTreap
Michael Anthony Knyszek [Sat, 9 Feb 2019 00:13:37 +0000 (00:13 +0000)]
runtime: add tests for runtime mTreap

This change exports the runtime mTreap in export_test.go and then adds a
series of tests which check that the invariants of the treap are
maintained under different operations. These tests also include tests
for the treap iterator type.

Also, we note that the find() operation on the treap never actually was
best-fit, so the tests just ensure that it returns an appropriately
sized span.

For #30333.

Change-Id: If81f7c746dda6677ebca925cb0a940134701b894
Reviewed-on: https://go-review.googlesource.com/c/go/+/164100
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
(cherry picked from commit d13a9312f52a3e861e02aff8ccb3f237b45b0822)
Reviewed-on: https://go-review.googlesource.com/c/go/+/173940
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
5 years ago[release-branch.go1.12] doc: update wording in contribution guide
Benny Siegert [Tue, 23 Apr 2019 12:19:04 +0000 (14:19 +0200)]
[release-branch.go1.12] doc: update wording in contribution guide

The top right menu in Gerrit is now a gear icon, and the link
has a slightly different title.

Change-Id: I3f5d194f31ad09a99416a45db392aa4b5c7d98ff
Reviewed-on: https://go-review.googlesource.com/c/go/+/173400
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit d0fadb93c2cc5d067813a106e6679f8a3ffd9c0f)
Reviewed-on: https://go-review.googlesource.com/c/go/+/173361
Reviewed-by: Andrew Bonventre <andybons@golang.org>
5 years ago[release-branch.go1.12] cmd/link: require cgo support for TestSectionsWithSameName
Ian Lance Taylor [Fri, 19 Apr 2019 16:50:01 +0000 (09:50 -0700)]
[release-branch.go1.12] cmd/link: require cgo support for TestSectionsWithSameName

The test doesn't really require cgo, but it does require that we know
the right flags to use to run the C compiler, and that is not
necessarily correct if we don't support cgo.

Fixes #31565

Change-Id: I04dc8db26697caa470e91ad712376aa621cf765d
Reviewed-on: https://go-review.googlesource.com/c/go/+/172981
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit 4c236b9b097882f3aef8116e1ac9f65463bf6f01)
Reviewed-on: https://go-review.googlesource.com/c/go/+/173117

5 years ago[release-branch.go1.12] cmd/link: don't fail if multiple ELF sections have the same...
Ian Lance Taylor [Thu, 18 Apr 2019 05:41:51 +0000 (22:41 -0700)]
[release-branch.go1.12] cmd/link: don't fail if multiple ELF sections have the same name

New versions of clang can generate multiple sections named ".text"
when using vague C++ linkage. This is valid ELF, but would cause the
Go linker to report an error when using internal linking:
    symbol PACKAGEPATH(.text) listed multiple times
Avoid the problem by renaming section symbol names if there is a name
collision.

Change-Id: I41127e95003d5b4554aaf849177b3fe000382c02
Reviewed-on: https://go-review.googlesource.com/c/go/+/172697
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
(cherry picked from commit 3235f7c0720338a160debe6e9c632b8af968b4dd)
Reviewed-on: https://go-review.googlesource.com/c/go/+/172701

5 years ago[release-branch.go1.12] doc: fix typo in go1.12 release notes
Dmitry Savintsev [Tue, 16 Apr 2019 09:20:51 +0000 (11:20 +0200)]
[release-branch.go1.12] doc: fix typo in go1.12 release notes

Change-Id: I3cb4fb7cacba51bfd611ade918f16c618e2569fd
Reviewed-on: https://go-review.googlesource.com/c/go/+/172159
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit e47090ab40967c2e5e6058838319259b4cc0d508)
Reviewed-on: https://go-review.googlesource.com/c/go/+/172317
Reviewed-by: Andrew Bonventre <andybons@golang.org>
5 years ago[release-branch.go1.12] os: don't treat RemoveAll("/x") as RemoveAll("x")
Ian Lance Taylor [Mon, 15 Apr 2019 17:36:17 +0000 (10:36 -0700)]
[release-branch.go1.12] os: don't treat RemoveAll("/x") as RemoveAll("x")

Updates #31468
Fixes #31474

Change-Id: I5c4e61631b8af35bfc14b0cb9bc77feec100e340
Reviewed-on: https://go-review.googlesource.com/c/go/+/172058
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit 3ebd9523bb0dcb975a34ec402f23eee07e81562f)
Reviewed-on: https://go-review.googlesource.com/c/go/+/172080

5 years ago[release-branch.go1.12] go1.12.4 go1.12.4
Andrew Bonventre [Thu, 11 Apr 2019 22:32:51 +0000 (18:32 -0400)]
[release-branch.go1.12] go1.12.4

Change-Id: I4d1b5e00ab4480b4c5adeeb4f53ddfdfa3903b71
Reviewed-on: https://go-review.googlesource.com/c/go/+/171838
Run-TryBot: Andrew Bonventre <andybons@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
5 years ago[release-branch.go1.12] doc: document Go 1.12.4 and Go 1.11.9
Brad Fitzpatrick [Thu, 11 Apr 2019 04:57:14 +0000 (04:57 +0000)]
[release-branch.go1.12] doc: document Go 1.12.4 and Go 1.11.9

Updates #31293

Change-Id: I3d72f732be7b28059310ea6fc134c3bfac81492d
Reviewed-on: https://go-review.googlesource.com/c/go/+/171578
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
(cherry picked from commit ab2a0803383f0f019db0b2252095f2fdb7735cea)
Reviewed-on: https://go-review.googlesource.com/c/go/+/171766
Reviewed-by: Bryan C. Mills <bcmills@google.com>
5 years ago[release-branch.go1.12] go1.12.3 go1.12.3
Andrew Bonventre [Mon, 8 Apr 2019 20:32:30 +0000 (16:32 -0400)]
[release-branch.go1.12] go1.12.3

Change-Id: Iab946b7c903e3c30addc388900421a7ceb803f1c
Reviewed-on: https://go-review.googlesource.com/c/go/+/171149
Run-TryBot: Andrew Bonventre <andybons@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
5 years ago[release-branch.go1.12] doc: correct link in 1.11.8 notes
Andrew Bonventre [Mon, 8 Apr 2019 20:07:49 +0000 (16:07 -0400)]
[release-branch.go1.12] doc: correct link in 1.11.8 notes

Change-Id: I09e0c2720ec0a51dc73c24b4550a749448656025
Reviewed-on: https://go-review.googlesource.com/c/go/+/171143
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit 6f512c8d6696b288372c48c19058bbe9dcb79da0)
Reviewed-on: https://go-review.googlesource.com/c/go/+/171157
Reviewed-by: Andrew Bonventre <andybons@golang.org>
5 years ago[release-branch.go1.12] doc: correct link in 1.12.3 notes
Andrew Bonventre [Mon, 8 Apr 2019 20:09:15 +0000 (16:09 -0400)]
[release-branch.go1.12] doc: correct link in 1.12.3 notes

Change-Id: I6dd60ea7b8a8756be97503e163c2386af16e4e12
Reviewed-on: https://go-review.googlesource.com/c/go/+/171144
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit 973c0312e36fd56b6b2111a07a19de63e0dcbf03)
Reviewed-on: https://go-review.googlesource.com/c/go/+/171147
Reviewed-by: Andrew Bonventre <andybons@golang.org>
5 years ago[release-branch.go1.12] doc: document Go 1.11.8
Andrew Bonventre [Mon, 8 Apr 2019 19:42:30 +0000 (15:42 -0400)]
[release-branch.go1.12] doc: document Go 1.11.8

Change-Id: Ia06f7005f466e55a22c76bf2b47d74ee8eb77dd1
Reviewed-on: https://go-review.googlesource.com/c/go/+/171139
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit 739a78f2b8de3139ec253719d0a688c08b8e5324)
Reviewed-on: https://go-review.googlesource.com/c/go/+/171145
Reviewed-by: Andrew Bonventre <andybons@golang.org>
5 years ago[release-branch.go1.12] doc: document Go 1.12.3
Andrew Bonventre [Mon, 8 Apr 2019 19:43:32 +0000 (15:43 -0400)]
[release-branch.go1.12] doc: document Go 1.12.3

Change-Id: I84c9a8ddbd3101dd478e4a8a4e191863e68c6af6
Reviewed-on: https://go-review.googlesource.com/c/go/+/171140
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit 8759b4d3843494b60dd9d58458b4f2774baf5fcb)
Reviewed-on: https://go-review.googlesource.com/c/go/+/171141

5 years ago[release-branch.go1.12] go1.12.2 go1.12.2
Andrew Bonventre [Fri, 5 Apr 2019 18:41:53 +0000 (14:41 -0400)]
[release-branch.go1.12] go1.12.2

Change-Id: I07e4404196886b7754414726f25092cca39861a7
Reviewed-on: https://go-review.googlesource.com/c/go/+/170888
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
5 years ago[release-branch.go1.12] cmd/go: avoid link error when -coverpkg covers main packages...
Jay Conrod [Mon, 18 Mar 2019 22:35:44 +0000 (18:35 -0400)]
[release-branch.go1.12] cmd/go: avoid link error when -coverpkg covers main packages (more)

This fixes two problems missed in CL 164877.

First, p.Internal.BuildInfo is now part of the cache key. This is
important since p.Internal.BuildInfo causes the build action to
synthesize a new source file, which affects the output.

Second, recompileForTest is always called for test
packages. Previously, it was only called when there were internal test
sources, so the fix in CL 164877 did not apply to packages that only
had external tests.

Fixes #30937

Change-Id: Iac2d7e8914f0313f9ab4222299a866f67889eb2e
Reviewed-on: https://go-review.googlesource.com/c/go/+/168200
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit d34548e0b6acc14a99bc6ffc225eedbb56e03d60)
Reviewed-on: https://go-review.googlesource.com/c/go/+/168717
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
5 years ago[release-branch.go1.12] runtime: fix write barrier on wasm
Austin Clements [Fri, 15 Mar 2019 17:29:40 +0000 (13:29 -0400)]
[release-branch.go1.12] runtime: fix write barrier on wasm

The current wasm write barrier implementation incorrectly implements
the "deletion" part of the barrier. It correctly greys the new value
of the pointer, but rather than also greying the old value of the
pointer, it greys the object containing the slot (which, since the old
value was just overwritten, is not going to contain the old value).

This can lead to unmarked, reachable objects.

Often, this is masked by other marking activity, but one specific
sequence that can lead to an unmarked object because of this bug is:

1. Initially, GC is off, object A is reachable from just one pointer
in the heap.

2. GC starts and scans the stack of goroutine G.

3. G copies the pointer to A on to its stack and overwrites the
pointer to A in the heap. (Now A is reachable only from G's stack.)

4. GC finishes while A is still reachable from G's stack.

With a functioning deletion barrier, step 3 causes A to be greyed.
Without a functioning deletion barrier, nothing causes A to be greyed,
so A will be freed even though it's still reachable from G's stack.

This CL fixes the wasm write barrier.

Fixes #30873.

Change-Id: I8a74ee517facd3aa9ad606e5424bcf8f0d78e754
Reviewed-on: https://go-review.googlesource.com/c/go/+/167743
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
(cherry picked from commit d9db9e32e924a60bbfbb15cc0dd7cfaaf8a62a3b)
Reviewed-on: https://go-review.googlesource.com/c/go/+/167745
Reviewed-by: Katie Hockman <katie@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

5 years ago[release-branch.go1.12] doc: document Go 1.12.2
Andrew Bonventre [Fri, 5 Apr 2019 18:29:16 +0000 (14:29 -0400)]
[release-branch.go1.12] doc: document Go 1.12.2

Change-Id: I990c451ff24844b39dee2477cec4caa9db2e8ebb
Reviewed-on: https://go-review.googlesource.com/c/go/+/170883
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit 5ec938cdcf7ab59f6d397cb3fa4d17459057ef61)
Reviewed-on: https://go-review.googlesource.com/c/go/+/170885
Reviewed-by: Andrew Bonventre <andybons@golang.org>
5 years ago[release-branch.go1.12] doc: document Go 1.11.7
Andrew Bonventre [Fri, 5 Apr 2019 18:31:54 +0000 (14:31 -0400)]
[release-branch.go1.12] doc: document Go 1.11.7

Change-Id: Iec5e69b3ea163f42234d3b73696427a7aa8732e3
Reviewed-on: https://go-review.googlesource.com/c/go/+/170884
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit e47ced78578c471cbcd34a7d6b223a71e84a46c8)
Reviewed-on: https://go-review.googlesource.com/c/go/+/170886
Reviewed-by: Andrew Bonventre <andybons@golang.org>
5 years agoRevert "[release-branch.go1.12] syscall: avoid _getdirentries64 on darwin"
Keith Randall [Fri, 5 Apr 2019 17:58:07 +0000 (17:58 +0000)]
Revert "[release-branch.go1.12] syscall: avoid _getdirentries64 on darwin"

This reverts commit 731ebf4d87dbe349e2eb60233c3965ee62a32690.

Reason for revert: It's not working for large directories.

Change-Id: Ie0f88e0ed1d36c4ea4f32d2acd4e223bd8229ca0
Reviewed-on: https://go-review.googlesource.com/c/go/+/170882
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Andrew Bonventre <andybons@golang.org>

5 years ago[release-branch.go1.12] syscall: avoid _getdirentries64 on darwin
Keith Randall [Wed, 20 Mar 2019 17:47:17 +0000 (10:47 -0700)]
[release-branch.go1.12] syscall: avoid _getdirentries64 on darwin

Getdirentries is implemented with the __getdirentries64 function
in libSystem.dylib. That function works, but it's on Apple's
can't-be-used-in-an-app-store-application list.

Implement Getdirentries using the underlying fdopendir/readdir_r/closedir.
The simulation isn't faithful, and could be slow, but it should handle
common cases.

Don't use Getdirentries in the stdlib, use fdopendir/readdir_r/closedir
instead (via (*os.File).readdirnames).

(Incorporates CL 170837 and CL 170698, which were small fixes to the
original tip CL.)

Fixes #31244

Update #28984

RELNOTE=yes

Change-Id: Ia6b5d003e5bfe43ba54b1e1d9cfa792cc6511717
Reviewed-on: https://go-review.googlesource.com/c/go/+/168479
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit 9da6530faab0a58c4c4e02b2f3f4a5c754dcbd4e)
Reviewed-on: https://go-review.googlesource.com/c/go/+/170640
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>

5 years ago[release-branch.go1.12] runtime: skip broken TestLldbPython
Brad Fitzpatrick [Mon, 1 Apr 2019 22:20:06 +0000 (22:20 +0000)]
[release-branch.go1.12] runtime: skip broken TestLldbPython

It's broken on our builders (once we enabled dev mode on our Macs,
see CL 170339)

Updates #31188

Change-Id: Iceea65dc79576057b401a461bfe39254fed1f7ed
Reviewed-on: https://go-review.googlesource.com/c/go/+/170281
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit 46c3e217188043c7cea9e181f0d61825d2636ad7)
Reviewed-on: https://go-review.googlesource.com/c/go/+/170798
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
5 years ago[release-branch.go1.12] internal/poll: fix deadlock in Write if len(buf) > maxRW
Ian Lance Taylor [Wed, 3 Apr 2019 22:30:13 +0000 (15:30 -0700)]
[release-branch.go1.12] internal/poll: fix deadlock in Write if len(buf) > maxRW

fd.l.Lock shouldn't be called in a loop.

Manual backport of CL 165598. It could not be cherry-picked due to conflicts.

Fixes #31211

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

5 years ago[release-branch.go1.12] cmd/compile: fix literal struct interface {} lost passing...
LE Manh Cuong [Fri, 22 Mar 2019 18:43:06 +0000 (01:43 +0700)]
[release-branch.go1.12] cmd/compile: fix literal struct interface {} lost passing by value

CL 135377 introduces pass strings and slices to convT2{E,I} by value.
Before that CL, all types, except interface will be allocated temporary
address. The CL changes the logic that only constant and type which
needs address (determine by convFuncName) will be allocated.

It fails to cover the case where type is static composite literal.
Adding condition to check that case fixes the issue.

Also, static composite literal node implies constant type, so consttype
checking can be removed.

Fixes #31209

Change-Id: Ifc750a029fb4889c2d06e73e44bf85e6ef4ce881
Reviewed-on: https://go-review.googlesource.com/c/go/+/168858
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
(cherry picked from commit d47db6dc0ce72d1371c81a677b45d7bdba39ff46)
Reviewed-on: https://go-review.googlesource.com/c/go/+/170437
Run-TryBot: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
5 years ago[release-branch.go1.12] net: use network and host as singleflight key during lookupIP
Cezar Sa Espinola [Thu, 7 Mar 2019 15:52:16 +0000 (12:52 -0300)]
[release-branch.go1.12] net: use network and host as singleflight key during lookupIP

In CL 120215 the cgo resolver was changed to have different logic based
on the network being queried. However, the singleflight cache key wasn't
updated to also include the network. This way it was possible for
concurrent queries to return the result for the wrong network.

This CL changes the key to include both network and host, fixing the
problem.

Fixes #31062

Change-Id: I8b41b0ce1d9a02d18876c43e347654312eba22fc
Reviewed-on: https://go-review.googlesource.com/c/go/+/166037
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit e341bae08d75611adea6566c1d01c1e3a0de57f9)
Reviewed-on: https://go-review.googlesource.com/c/go/+/170320
Run-TryBot: Andrew Bonventre <andybons@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

5 years ago[release-branch.go1.12] cmd/compile: copy volatile values before emitting write barri...
Cherry Zhang [Thu, 21 Mar 2019 17:40:28 +0000 (13:40 -0400)]
[release-branch.go1.12] cmd/compile: copy volatile values before emitting write barrier call

It is possible that a "volatile" value (one that can be clobbered
by preparing args of a call) to be used in multiple write barrier
calls. We used to copy the volatile value right before each call.
But this doesn't work if the value is used the second time, after
the first call where it is already clobbered. Copy it before
emitting any call.

Updates #30977.
Fixes #30996.

Change-Id: Iedcc91ad848d5ded547bf37a8359c125d32e994c
Reviewed-on: https://go-review.googlesource.com/c/go/+/168677
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
(cherry picked from commit f23c601bf9f66ef4a0d9d2dcd003b95e78fb28f8)
Reviewed-on: https://go-review.googlesource.com/c/go/+/168817
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>

5 years ago[release-branch.go1.12] net/http/httputil: make ReverseProxy flush headers on FlushIn...
Jordan Liggitt [Fri, 29 Mar 2019 03:37:54 +0000 (23:37 -0400)]
[release-branch.go1.12] net/http/httputil: make ReverseProxy flush headers on FlushInterval

A regression was introduced in CL 137335 (5440bfc) that caused FlushInterval
to not be honored until the first Write() call was encountered. This change
starts the flush timer as part of setting up the maxLatencyWriter.

Fixes #31144

Change-Id: I75325bd926652922219bd1457b2b00ac6d0d41b0
Reviewed-on: https://go-review.googlesource.com/c/go/+/170066
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit 2cc347382f4df3fb40d8d81ec9331f0748b1c394)
Reviewed-on: https://go-review.googlesource.com/c/go/+/170137

5 years ago[release-branch.go1.12] cmd/go: fix the default build output name for versioned binaries
Dmitri Shuralyov [Thu, 21 Mar 2019 17:31:32 +0000 (13:31 -0400)]
[release-branch.go1.12] cmd/go: fix the default build output name for versioned binaries

This change is a re-apply of the reverted CL 140863 with changes to
address issue #30821. Specifically, path.Split continues to be used
to split the '/'-separated import path, rather than filepath.Split.

Document the algorithm for how the default executable name is determined
in DefaultExecName.

Rename a variable returned from os.Stat from bs to fi for consistency.

CL 140863 factored out the logic to determine the default executable
name from the Package.load method into a DefaultExecName function,
and started using it in more places to avoid having to re-implement
the logic everywhere it's needed. Most previous callers already computed
the default executable name based on the import path. The load.Package
method, before CL 140863, was the exception, in that it used the p.Dir
value in GOPATH mode instead. There was a NOTE(rsc) comment that it
should be equivalent to use import path, but it was too late in Go 1.11
cycle to risk implementing that change.

This is part 1, a more conservative change for backporting to Go 1.12.2,
and it keeps the original behavior of splitting on p.Dir in GOPATH mode.
Part 2 will address the NOTE(rsc) comment and modify behavior in
Package.load to always use DefaultExecName which splits the import path
rather than directory. It is intended to be included in Go 1.13.

Updates #27283
Updates #26869
Updates #30821
Fixes #30266

Change-Id: Ib1ebb95acba7c85c24e3a55c40cdf48405af34f3
Reviewed-on: https://go-review.googlesource.com/c/go/+/167503
Reviewed-by: Jay Conrod <jayconrod@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
(cherry picked from commit 94563de87fad642677ffc62a4a82766597e39123)
Reviewed-on: https://go-review.googlesource.com/c/go/+/168958
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

5 years ago[release-branch.go1.12] net: fix test after 8.8.8.8 changed its reverse DNS name
Brad Fitzpatrick [Wed, 27 Mar 2019 17:41:12 +0000 (17:41 +0000)]
[release-branch.go1.12] net: fix test after 8.8.8.8 changed its reverse DNS name

Google's 8.8.8.8 DNS server used to reports its reverse DNS name
as ending in ".google.com". Now it's "dns.google.".

Change-Id: I7dd15f03239e5c3f202e471618ab867690cb4f9d
Reviewed-on: https://go-review.googlesource.com/c/go/+/169679
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
(cherry picked from commit 3089d189569ed272eaf2bc6c4330e848a46e9999)
Reviewed-on: https://go-review.googlesource.com/c/go/+/169717

5 years ago[release-branch.go1.12] cmd/compile: better handling for PAUTOHEAP in DWARF inline gen
Than McIntosh [Fri, 22 Mar 2019 12:14:45 +0000 (08:14 -0400)]
[release-branch.go1.12] cmd/compile: better handling for PAUTOHEAP in DWARF inline gen

When generating DWARF inline info records, the post-SSA code looks
through the original "pre-inline" dcl list for the function so as to
handle situations where formal params are promoted or optimized away.
This code was not properly handling the case where an output parameter
was promoted to the heap -- in this case the param node is converted
in place from class PPARAMOUT to class PAUTOHEAP. This caused
inconsistencies later on, since the variable entry in the abstract
subprogram DIE wound up as a local and not an output parameter.

Updates #30908.
Fixes #31028.

Change-Id: Ia70b89f0cf7f9b16246d95df17ad6e307228b8c7
Reviewed-on: https://go-review.googlesource.com/c/go/+/168818
Reviewed-by: Cherry Zhang <cherryyz@google.com>
(cherry picked from commit 68a98d52794fc324841f62732411f6bba23fc62c)
Reviewed-on: https://go-review.googlesource.com/c/go/+/169417
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

5 years ago[release-branch.go1.12] runtime: safely load DLLs
Jason A. Donenfeld [Wed, 6 Mar 2019 18:26:29 +0000 (19:26 +0100)]
[release-branch.go1.12] runtime: safely load DLLs

While many other call sites have been moved to using the proper
higher-level system loading, these areas were left out. This prevents
DLL directory injection attacks. This includes both the runtime load
calls (using LoadLibrary prior) and the implicitly linked ones via
cgo_import_dynamic, which we move to our LoadLibraryEx. The goal is to
only loosely load kernel32.dll and strictly load all others.

Meanwhile we make sure that we never fallback to insecure loading on
older or unpatched systems.

This is CVE-2019-9634.

Fixes #30666
Updates #14959
Updates #28978
Updates #30642

Change-Id: I401a13ed8db248ab1bb5039bf2d31915cac72b93
Reviewed-on: https://go-review.googlesource.com/c/go/+/165798
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
(cherry picked from commit 9b6e9f0c8c66355c0f0575d808b32f52c8c6d21c)
Reviewed-on: https://go-review.googlesource.com/c/go/+/168339
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
5 years ago[release-branch.go1.12] os: consistently return PathError from RemoveAll
Baokun Lee [Fri, 1 Mar 2019 10:04:14 +0000 (18:04 +0800)]
[release-branch.go1.12] os: consistently return PathError from RemoveAll

Fixes #30859
Updates #30491

Change-Id: If4070e5d39d8649643d7e90f6f3eb499642e25ab
Reviewed-on: https://go-review.googlesource.com/c/go/+/164720
Run-TryBot: Baokun Lee <nototon@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
(cherry picked from commit d039e12b54a73796caa913994597a9f3a73e8e87)
Reviewed-on: https://go-review.googlesource.com/c/go/+/167739
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Baokun Lee <nototon@gmail.com>
5 years ago[release-branch.go1.12] doc: add minor revisions header for 1.12
Andrew Bonventre [Thu, 14 Mar 2019 20:44:38 +0000 (16:44 -0400)]
[release-branch.go1.12] doc: add minor revisions header for 1.12

Change-Id: I0d4a55af0bee754ab1ee817780027e9f72475afb
Reviewed-on: https://go-review.googlesource.com/c/go/+/167712
Reviewed-by: Andrew Bonventre <andybons@golang.org>
5 years ago[release-branch.go1.12] go1.12.1 go1.12.1
Andrew Bonventre [Thu, 14 Mar 2019 18:15:58 +0000 (14:15 -0400)]
[release-branch.go1.12] go1.12.1

Change-Id: Id5f76204b8cd3fe67c21c5adfd3a4e456a8cad14
Reviewed-on: https://go-review.googlesource.com/c/go/+/167704
Run-TryBot: Andrew Bonventre <andybons@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
5 years ago[release-branch.go1.12] doc: document Go 1.12.1
Andrew Bonventre [Thu, 14 Mar 2019 18:03:30 +0000 (14:03 -0400)]
[release-branch.go1.12] doc: document Go 1.12.1

Change-Id: I6d3a615c5f72e9aa29d23e127af98d6e836da173
Reviewed-on: https://go-review.googlesource.com/c/go/+/167699
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit f832a97e454a5e2bed336321965fd2382b2af868)
Reviewed-on: https://go-review.googlesource.com/c/go/+/167702
Reviewed-by: Andrew Bonventre <andybons@golang.org>
5 years ago[release-branch.go1.12] doc: document Go 1.11.6
Andrew Bonventre [Thu, 14 Mar 2019 17:58:47 +0000 (13:58 -0400)]
[release-branch.go1.12] doc: document Go 1.11.6

Change-Id: I99832fa4f2c3ec28e2dad46cf7607f3766948031
Reviewed-on: https://go-review.googlesource.com/c/go/+/167698
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit d3bb45d9046bb7d12c4fc9cdaf122f36d001fd31)
Reviewed-on: https://go-review.googlesource.com/c/go/+/167701

5 years agoRevert "[release-branch.go1.12] cmd/go: fix the default build output name for version...
Bryan C. Mills [Thu, 14 Mar 2019 14:27:26 +0000 (14:27 +0000)]
Revert "[release-branch.go1.12] cmd/go: fix the default build output name for versioned binaries"

This reverts commit 746edd459d26f07f69fcb6bddfafaaae7c5a2911 (CL 167384).

Reason for revert: Dmitri identified a potential problem in https://go-review.googlesource.com/c/go/+/140863/11#message-db0ff6bb2c7b06161ca47de771c4465afa8b1102, and we'd like more time to investigate without holding up the 1.12 release branch.

Updates #27283
Updates #30266
Updates #30821

Change-Id: I49d7bbbe200e80b81899c3bcbf7844717af010aa
Reviewed-on: https://go-review.googlesource.com/c/go/+/167617
Reviewed-by: Andrew Bonventre <andybons@golang.org>
5 years ago[release-branch.go1.12] cmd/cgo: use explicit type for arg with bad pointer typedef
Ian Lance Taylor [Thu, 7 Mar 2019 01:31:04 +0000 (17:31 -0800)]
[release-branch.go1.12] cmd/cgo: use explicit type for arg with bad pointer typedef

Fixes #30816
Updates #30646

Change-Id: I5b7e986b0588e87b9781cce01445e3c55c06b6fc
Reviewed-on: https://go-review.googlesource.com/c/go/+/165897
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit a6436a5655f56bb904871fece7db43a3ad3bf415)
Reviewed-on: https://go-review.googlesource.com/c/go/+/167497
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>

5 years ago[release-branch.go1.12] cmd/go: fix the default build output name for versioned binaries
Hana Kim [Mon, 14 Jan 2019 16:13:34 +0000 (11:13 -0500)]
[release-branch.go1.12] cmd/go: fix the default build output name for versioned binaries

`go build` has chosen the last element of the package import path
as the default output name when -o option is given. That caused
the output of a package build when the module root is the major
version component such as 'v2'.

A similar issue involving `go install` was fixed in
https://golang.org/cl/128900. This CL refactors the logic added
with the change and makes it available as
internal/load.DefaultExecName.

This CL makes 'go test' to choose the right default test binary
name when the tested package is in the module root. (E.g.,
instead of v2.test, choose pkg.test for the test of 'path/pkg/v2')

Fixes #27283
Fixes #30266

Change-Id: I6905754f0906db46e3ce069552715f45356913ae
Reviewed-on: https://go-review.googlesource.com/c/go/+/140863
Reviewed-by: Bryan C. Mills <bcmills@google.com>
(cherry picked from commit bf94fc3ae387fc09929443393741919fac6727af)
Reviewed-on: https://go-review.googlesource.com/c/go/+/167384
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>