]> Cypherpunks repositories - gostls13.git/log
gostls13.git
3 years agocmd/go: remove hint when no module is suggested
Constantin Konstantinidis [Sat, 5 Jun 2021 05:48:30 +0000 (07:48 +0200)]
cmd/go: remove hint when no module is suggested

Fixes #46528

Change-Id: I2453d321ece878ea7823865758aa4a16b3ed7fe8
Reviewed-on: https://go-review.googlesource.com/c/go/+/325430
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Trust: Heschi Kreinick <heschi@google.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>

3 years agosyscall: do not load native libraries on non-native powershell on arm
Jason A. Donenfeld [Fri, 11 Jun 2021 15:36:50 +0000 (17:36 +0200)]
syscall: do not load native libraries on non-native powershell on arm

The powershell that currently ships on ARM Windows isn't native, so it
won't load native DLLs. So just skip the tests for now, and reenable it
if this ever changes.

Updates #46701.

Change-Id: I2559fdf13cb65d3ecdc4c6f6df7dec1b490b9651
Reviewed-on: https://go-review.googlesource.com/c/go/+/327210
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>

3 years agoruntime: loop on EINTR in macOS sigNoteSleep
Ian Lance Taylor [Thu, 10 Jun 2021 22:35:05 +0000 (15:35 -0700)]
runtime: loop on EINTR in macOS sigNoteSleep

Fixes #46466

Change-Id: I8fb15d0c8ef7ef6e6fc1b9e0e033d213255fe0df
Reviewed-on: https://go-review.googlesource.com/c/go/+/326778
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
3 years agodoc/go1.17: clean up formatting of gofmt section
Brad Fitzpatrick [Thu, 10 Jun 2021 21:40:58 +0000 (14:40 -0700)]
doc/go1.17: clean up formatting of gofmt section

It was the only h3 in <code>, and it lacked <p> around its content.

It looked like it was part of the prior section:

    https://tip.golang.org/doc/go1.17#gofmt

Change-Id: I7e9ef70e9a03474225833f44420aabd70dab3cd5
Reviewed-on: https://go-review.googlesource.com/c/go/+/326774
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Brad Fitzpatrick <bradfitz@golang.org>

3 years agocmd/go: match Windows paths in TestScript/mod_invalid_version
Bryan C. Mills [Thu, 10 Jun 2021 20:54:53 +0000 (16:54 -0400)]
cmd/go: match Windows paths in TestScript/mod_invalid_version

Fixes #46691

Change-Id: I3bef9a773be640bed96eb2dc395cb11671a0767a
Reviewed-on: https://go-review.googlesource.com/c/go/+/326869
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
3 years agodoc/go1.17: fix formatting near httptest
Rhys Hiltner [Thu, 10 Jun 2021 22:05:07 +0000 (15:05 -0700)]
doc/go1.17: fix formatting near httptest

Change-Id: Ic1a0add3a1e137ca5cd0f3e9ce3266191b0b55cd
Reviewed-on: https://go-review.googlesource.com/c/go/+/326777
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
3 years agonet/http: remove test-only private key from production binaries
Damien Neil [Thu, 10 Jun 2021 17:50:37 +0000 (10:50 -0700)]
net/http: remove test-only private key from production binaries

The net/http/internal package contains a PEM-encoded private key used in
tests. This key is initialized at init time, which prevents it from
being stripped by the linker in non-test binaries.

Move the certificate and key to a new net/http/internal/testcert
package to ensure it is only included in binaries that reference it.

Fixes #46677.

Change-Id: Ie98bda529169314cc791063e7ce4d99ef99113c8
Reviewed-on: https://go-review.googlesource.com/c/go/+/326771
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
3 years agocmd/go: report the imports of CompiledGoFiles in ImportMap
Bryan C. Mills [Tue, 8 Jun 2021 19:53:08 +0000 (15:53 -0400)]
cmd/go: report the imports of CompiledGoFiles in ImportMap

Ideally we should encode the load.PackageInternal data in a way that
doesn't rely on 1:1 correlations of slices, but this is a minimal fix
to unblock Go 1.17.

Fixes #46462

Change-Id: I6e029c69f757aadc54d4be02c01d6b294c217542
Reviewed-on: https://go-review.googlesource.com/c/go/+/326610
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>

3 years agocrypto/tls: let HTTP/1.1 clients connect to servers with NextProtos "h2" go1.17beta1
Filippo Valsorda [Mon, 7 Jun 2021 12:24:22 +0000 (08:24 -0400)]
crypto/tls: let HTTP/1.1 clients connect to servers with NextProtos "h2"

Fixes #46310

Change-Id: Idd5e30f05c439f736ae6f3904cbb9cc2ba772315
Reviewed-on: https://go-review.googlesource.com/c/go/+/325432
Trust: Filippo Valsorda <filippo@golang.org>
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
3 years agoapi: promote next to go1.17
Heschi Kreinick [Wed, 9 Jun 2021 19:21:39 +0000 (15:21 -0400)]
api: promote next to go1.17

Change-Id: If631878a2f6ec0317b4fad614f98ab102810ed47
Reviewed-on: https://go-review.googlesource.com/c/go/+/326410
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
3 years agodoc/go1.17: remove lingering TODO
Heschi Kreinick [Wed, 9 Jun 2021 16:59:30 +0000 (12:59 -0400)]
doc/go1.17: remove lingering TODO

As far as I can tell the Core Library section is complete. Remove its
TODO.

Change-Id: Ia84c6656fac045e25fae1a7ce8b488a3a26fd250
Reviewed-on: https://go-review.googlesource.com/c/go/+/326469
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
3 years agodoc/go1.17: document strconv changes for Go 1.17
Damien Neil [Tue, 8 Jun 2021 21:26:13 +0000 (14:26 -0700)]
doc/go1.17: document strconv changes for Go 1.17

For #44513.
Fixes #46021.

Change-Id: I40a4645fedfae24f67e249743c6a143e71b9f507
Reviewed-on: https://go-review.googlesource.com/c/go/+/326150
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
3 years agostrconv: document parsing of leading +/-
Damien Neil [Mon, 7 Jun 2021 23:30:03 +0000 (16:30 -0700)]
strconv: document parsing of leading +/-

Explicitly document the handling of a sign prefix, and the interaction
between the sign and base prefixes.

Fixes #46641.

Change-Id: I3cd6773e3f074fe671a944a05a79d2408137fcd4
Reviewed-on: https://go-review.googlesource.com/c/go/+/325875
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
3 years agodoc/go1.17: document //go:build lines
Heschi Kreinick [Wed, 9 Jun 2021 00:34:16 +0000 (20:34 -0400)]
doc/go1.17: document //go:build lines

In 1.17, //go:build lines are fully supported. This entails changes to
the go command, vet, and gofmt. Document all of them.

I'm not Russ, but this is a significant change, it slipped under the
radar, and we're trying to get the release out. So here's what I got.

I wasn't sure where to put the go command change. On the one hand,
it's pretty significant. On the other, it certainly affects fewer
people than lazy loading. So it probably shouldn't be first, but I also
didn't want to bury it the middle of all the other module changes. Open
to suggestions.

Change-Id: Ia1a96bcfb1977973c5b0b0a6b18a9242a745af12
Reviewed-on: https://go-review.googlesource.com/c/go/+/326209
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
3 years agonet/http: add AllowQuerySemicolons
Filippo Valsorda [Wed, 9 Jun 2021 11:43:57 +0000 (07:43 -0400)]
net/http: add AllowQuerySemicolons

Fixes #45973

Change-Id: I6cbe05f5d1d3c324900c74314b0ea0e12524d7f2
Reviewed-on: https://go-review.googlesource.com/c/go/+/326309
Run-TryBot: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
Trust: Katie Hockman <katie@golang.org>
Trust: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>

3 years agodoc/go1.17: remove TODO for ports section
Cherry Mui [Wed, 9 Jun 2021 15:04:58 +0000 (11:04 -0400)]
doc/go1.17: remove TODO for ports section

I'm not aware of anything more to mention for ports.

Change-Id: I686df8a230a55ad7f4c5eae43ca27f85fad9dd84
Reviewed-on: https://go-review.googlesource.com/c/go/+/326409
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
3 years agonet/url: reject query values with semicolons
Katie Hockman [Mon, 7 Jun 2021 18:29:43 +0000 (14:29 -0400)]
net/url: reject query values with semicolons

Semicolons are no longer valid separators, so
net/url.ParseQuery will now return an error
if any part of the query contains a semicolon.

net/http.(*Request).ParseMultipartForm has been
changed to fall through and continue parsing
even if the call to (*Request).ParseForm fails.

This change also includes a few minor refactors
to existing tests.

Fixes #25192

Change-Id: Iba3f108950fb99b9288e402c41fe71ca3a2ababd
Reviewed-on: https://go-review.googlesource.com/c/go/+/325697
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
3 years agomath/big: comment division
Russ Cox [Thu, 13 May 2021 14:46:58 +0000 (10:46 -0400)]
math/big: comment division

The comments in the code refer to Knuth and to Burnikel and Ziegler,
but Knuth's presentation is inscrutable, and our recursive division
code does not bear much resemblance to Burnikel and Ziegler's paper
(which is fine, ours is nicer).

Add a standalone explanation of division instead of referring to
difficult or not-directly-used references.

Change-Id: Ic1b35dc167fb29a69ee00e0b4a768ac9cc9e1324
Reviewed-on: https://go-review.googlesource.com/c/go/+/321078
Trust: Russ Cox <rsc@golang.org>
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
3 years agocmd/compile: make map.zero symbol content-addressable
Than McIntosh [Wed, 9 Jun 2021 00:09:49 +0000 (20:09 -0400)]
cmd/compile: make map.zero symbol content-addressable

The compiler machinery that generates "map.zero" symbols marks them as
RODATA and DUPOK, which is problematic when a given application has
multiple map zero symbols (from different packages) with varying
sizes: the dupok path in the loader assumes that if two symbols have
the same name, it is safe to pick any of the versions. In the case of
map.zero, the link needs to select the largest symbol, not an
arbitrary sym.

To fix this problem, mark map.zero symbols as content-addressable,
since the loader's content addressability processing path already
supports selection of the larger symbol in cases where there are dups.

Fixes #46653.

Change-Id: Iabd2feef01d448670ba795c7eaddc48c191ea276
Reviewed-on: https://go-review.googlesource.com/c/go/+/326211
Trust: Than McIntosh <thanm@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
3 years agocmd/link: fix bug in -strictdups checking of BSS symbols
Than McIntosh [Tue, 8 Jun 2021 23:45:41 +0000 (19:45 -0400)]
cmd/link: fix bug in -strictdups checking of BSS symbols

The linker's -strictdups debugging option was not properly checking
for cases where you have two dupok BSS symbols with different length
(the check examined data length and content, but not symbol size).

Updates #46653.

Change-Id: I3844f25ef76dd6e4a84ffd5caed5d19a1b1a57c9
Reviewed-on: https://go-review.googlesource.com/c/go/+/326210
Trust: Than McIntosh <thanm@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
3 years agodoc/go1.17: mention new possibility of type conversion panicking
Ian Lance Taylor [Tue, 8 Jun 2021 19:42:02 +0000 (12:42 -0700)]
doc/go1.17: mention new possibility of type conversion panicking

For #44513
For #46020

Change-Id: I07c7a4268465c536d1866cc6bb1fad76b2b88b15
Reviewed-on: https://go-review.googlesource.com/c/go/+/326149
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
3 years agodoc/go1.17: mention new vet checks sigchanyzer and stdmethods.
Tim King [Wed, 26 May 2021 02:23:02 +0000 (19:23 -0700)]
doc/go1.17: mention new vet checks sigchanyzer and stdmethods.

These vet checks were added in CL 299532 and CL 321389.

Also adds a TODO for buildtags.

Change-Id: I516dc77729f6d2dc147318260fe452831b115dfa
Reviewed-on: https://go-review.googlesource.com/c/go/+/322769
Trust: Tim King <taking@google.com>
Run-TryBot: Tim King <taking@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
3 years agodoc/go1.17: mention block profile bias fix
Cherry Mui [Tue, 8 Jun 2021 20:42:02 +0000 (16:42 -0400)]
doc/go1.17: mention block profile bias fix

Re-apply the doc part of CL 324471, originally written by Felix Geisendörfer.

Change-Id: I831bead9a385bc5a5eed3058649a25ef17373bc6
Reviewed-on: https://go-review.googlesource.com/c/go/+/326171
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
3 years agoRevert "doc/go1.17: mention block profile bias fix"
Cherry Mui [Tue, 8 Jun 2021 20:38:30 +0000 (20:38 +0000)]
Revert "doc/go1.17: mention block profile bias fix"

This reverts CL 324471 (commit 689f4c7415acc8a135440574a483e0eeabba8b87).

Reason for revert: break ~all builders. And it is not a doc-only change.

Change-Id: Iadbdda34d2ca476a9f5e6c2d3a28592ed7ccb067
Reviewed-on: https://go-review.googlesource.com/c/go/+/326170
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
3 years agonet: reject leading zeros in IP address parsers
Roland Shoemaker [Mon, 7 Jun 2021 17:21:29 +0000 (10:21 -0700)]
net: reject leading zeros in IP address parsers

In both net.ParseIP and net.ParseCIDR reject leading zeros in the
dot-decimal notation of IPv4 addresses.

Fixes #30999
Fixes #43389

Change-Id: I2b6a31fe84db89ac828cf5ed03eaa586ee96ab68
Reviewed-on: https://go-review.googlesource.com/c/go/+/325829
Trust: Roland Shoemaker <roland@golang.org>
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>

3 years agodoc/go1.17: revise OpenBSD release notes
Cherry Mui [Wed, 26 May 2021 16:14:19 +0000 (12:14 -0400)]
doc/go1.17: revise OpenBSD release notes

Updates #44513.

Change-Id: I64077859fa3061fee8327599875ad3870d603a81
Reviewed-on: https://go-review.googlesource.com/c/go/+/322856
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
3 years agodoc/go1.17: mention block profile bias fix
Felix Geisendörfer [Thu, 3 Jun 2021 13:33:08 +0000 (15:33 +0200)]
doc/go1.17: mention block profile bias fix

Change-Id: I76fd872b2d74704396f0683ffa9cec40b7027247
Reviewed-on: https://go-review.googlesource.com/c/go/+/324471
Reviewed-by: Heschi Kreinick <heschi@google.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>

3 years agodoc/go1.17: remove TODO for Tools section
Bryan C. Mills [Mon, 7 Jun 2021 21:11:32 +0000 (17:11 -0400)]
doc/go1.17: remove TODO for Tools section

Change-Id: I6cd7376bd051222a830cbf18cf7e887072b61f3b
Reviewed-on: https://go-review.googlesource.com/c/go/+/325911
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
3 years agodoc/go1.17: resolve TODO for cmd/cover
Bryan C. Mills [Mon, 7 Jun 2021 17:43:55 +0000 (13:43 -0400)]
doc/go1.17: resolve TODO for cmd/cover

Updates #32211

Change-Id: Ie38e831fcf557534023afd552d9394fe9e055caa
Reviewed-on: https://go-review.googlesource.com/c/go/+/325909
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
3 years agocmd/go: in Go 1.17+ modules, add indirect go.mod dependencies separately from direct...
Bryan C. Mills [Tue, 8 Jun 2021 03:04:16 +0000 (23:04 -0400)]
cmd/go: in Go 1.17+ modules, add indirect go.mod dependencies separately from direct ones

Fixes #45965

Change-Id: If5c0d7b29e9f81be0763f3fa68051d4ef5419990
Reviewed-on: https://go-review.googlesource.com/c/go/+/325922
Trust: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
3 years agodoc/go1.17: add release notes for crypto packages
Filippo Valsorda [Mon, 7 Jun 2021 14:20:38 +0000 (10:20 -0400)]
doc/go1.17: add release notes for crypto packages

For #44513

Change-Id: I459b3a4f9936eaa2c09888177f91176140d04280
Reviewed-on: https://go-review.googlesource.com/c/go/+/325649
Trust: Filippo Valsorda <filippo@golang.org>
Trust: Katie Hockman <katie@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
3 years agodoc/go1.17: add a release note for the '-compat' flag to 'go mod tidy'
Bryan C. Mills [Mon, 7 Jun 2021 21:04:32 +0000 (17:04 -0400)]
doc/go1.17: add a release note for the '-compat' flag to 'go mod tidy'

Updates #46141

Change-Id: I7a6a84f816e3db19bb492f862366a29dc46ed2ee
Reviewed-on: https://go-review.googlesource.com/c/go/+/325910
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
3 years agocmd/compile: use t.AllMethods when sorting typesByString
Cuong Manh Le [Sun, 30 May 2021 08:35:06 +0000 (15:35 +0700)]
cmd/compile: use t.AllMethods when sorting typesByString

For interface types, t.Methods contains only unexpanded method set, i.e
exclusive of interface embedding. Thus, we can't use it to detect an
interface contains embedding empty interface, like in:

type EI interface{}

func f() interface{ EI } {
return nil
}

At the time we generate runtime types, we want to check against the full
method set of interface instead.

Fixes #46386

Change-Id: Idff53ad39276be6632eb5932b76e855c15cbdd2e
Reviewed-on: https://go-review.googlesource.com/c/go/+/323649
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
3 years agoruntime: remove out-of-date comments about frame skipping
Matthew Dempsky [Mon, 7 Jun 2021 23:24:40 +0000 (16:24 -0700)]
runtime: remove out-of-date comments about frame skipping

skipPleaseUseCallersFrames was removed in CL 152537.

Change-Id: Ide47feec85a33a6fb6882e16baf9e21492521640
Reviewed-on: https://go-review.googlesource.com/c/go/+/325949
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
3 years agodoc: document Go 1.17 language changes
Matthew Dempsky [Mon, 7 Jun 2021 21:28:14 +0000 (14:28 -0700)]
doc: document Go 1.17 language changes

Fixes #46020.

Change-Id: Iadf9a0ac4a8863e17155d6ba1af2cc497634a634
Reviewed-on: https://go-review.googlesource.com/c/go/+/325870
Trust: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
3 years agocmd/dist: pass -Wno-lto-type-mismatch in swig_callback_lto
Ian Lance Taylor [Thu, 3 Jun 2021 21:15:12 +0000 (14:15 -0700)]
cmd/dist: pass -Wno-lto-type-mismatch in swig_callback_lto

Fixes #46557

Change-Id: I95200ddd60e2879db15dd7353c2152b515c89020
Reviewed-on: https://go-review.googlesource.com/c/go/+/324909
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
3 years agostrconv: ParseFloat: always return ErrSyntax for bad syntax
Ian Lance Taylor [Mon, 7 Jun 2021 17:51:33 +0000 (10:51 -0700)]
strconv: ParseFloat: always return ErrSyntax for bad syntax

Previously we would sometimes return ErrRange if the parseable part of
the floating point number was out of range.

Fixes #46628

Change-Id: I15bbbb1e2a56fa27c19fe25ab5554d988cbfd9d2
Reviewed-on: https://go-review.googlesource.com/c/go/+/325750
Trust: Ian Lance Taylor <iant@golang.org>
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
3 years agocrypto/elliptic: update P-521 docs to say it's constant-time
Filippo Valsorda [Mon, 7 Jun 2021 14:22:05 +0000 (10:22 -0400)]
crypto/elliptic: update P-521 docs to say it's constant-time

This is true since CL 315274.

Also adjust the P-256 note, since Add, Double, and IsOnCurve use the
generic, non-constant-time implementation.

Change-Id: I4b3b340f65bce91dcca30bcf86456cc8ce4dd4bb
Reviewed-on: https://go-review.googlesource.com/c/go/+/325650
Trust: Filippo Valsorda <filippo@golang.org>
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>

3 years agofmt: split package documentation into more sections
Branden J Brown [Wed, 2 Jun 2021 18:55:34 +0000 (14:55 -0400)]
fmt: split package documentation into more sections

The package-level documentation on fmt previously had only two formal
sections, for printing and scanning. Because of this, the section on
printing was very long, including some pseudo-sections describing
particular features. This feature makes those pseudo-sections into
proper sections, both to improve readability and so that those sections
have hyperlinks on documentation sites.

Fixes #46522

Change-Id: I38b7bc3447610faca446051da235edcbbd063f61
Reviewed-on: https://go-review.googlesource.com/c/go/+/324349
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Tobias Klauser <tobias.klauser@gmail.com>

3 years agocrypto/tls: fix typo in Config.NextProtos docs
Filippo Valsorda [Mon, 7 Jun 2021 14:24:11 +0000 (10:24 -0400)]
crypto/tls: fix typo in Config.NextProtos docs

Change-Id: I916df584859595067e5e86c35607869397dbbd8c
Reviewed-on: https://go-review.googlesource.com/c/go/+/325651
Trust: Filippo Valsorda <filippo@golang.org>
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
3 years agospec: improve wording consistency by eliminating "specifier"
DQNEO [Mon, 31 May 2021 03:33:28 +0000 (12:33 +0900)]
spec: improve wording consistency by eliminating "specifier"

The word "specifier" is used once only here and technically not defined.

Change-Id: Ifc9f0582f4eb3c3011ba60d8008234de511d4be6
Reviewed-on: https://go-review.googlesource.com/c/go/+/323730
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Ian Lance Taylor <iant@golang.org>
Trust: Robert Griesemer <gri@golang.org>

3 years agospec: improve wording by choosing an official term "keyword"
DQNEO [Mon, 31 May 2021 03:15:12 +0000 (12:15 +0900)]
spec: improve wording by choosing an official term "keyword"

Replace "reserved word" by "keyword" as the latter is the official term.

Change-Id: I9f269759b872026034a9f47e4a761cff2d348ca0
Reviewed-on: https://go-review.googlesource.com/c/go/+/323729
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Ian Lance Taylor <iant@golang.org>
Trust: Robert Griesemer <gri@golang.org>

3 years agogo/internal/gcimporter: don't waste CPU copying bytes in `io.ReadAll`
Sergey Zagursky [Fri, 4 Jun 2021 09:25:51 +0000 (12:25 +0300)]
go/internal/gcimporter: don't waste CPU copying bytes in `io.ReadAll`

`io.ReadAll` dynamically reallocates byte slice because it doesn't know
its size in advance. We don't need to read an entire file into memory
and therefore may use `bufio.Reader` to read its contents.

Fixes #46564

Change-Id: Id504b1512662b6dea4775d523455896fa4162ab3
Reviewed-on: https://go-review.googlesource.com/c/go/+/325429
Reviewed-by: Dominik Honnef <dominik@honnef.co>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Trust: Matthew Dempsky <mdempsky@google.com>
Trust: Dominik Honnef <dominik@honnef.co>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>

3 years agomisc/cgo/errors: use expected column numbers
Ian Lance Taylor [Fri, 4 Jun 2021 15:16:58 +0000 (08:16 -0700)]
misc/cgo/errors: use expected column numbers

The test was using the wrong column numbers, and was erroneously
passing because there happened to be line numbers that matched those
column numbers. Change the test harness to require the expected line
number for the ERROR HERE regexp case, so that this doesn't happen again.

Also rename a couple of variables in the test to avoid useless
redeclaration errors.

Fixes #46534

Change-Id: I2fcbf5e379c346de5346035c73d174a3980c0927
Reviewed-on: https://go-review.googlesource.com/c/go/+/324970
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
3 years agocmd/compile/internal/abi: fix typo in comment
sryoya [Fri, 4 Jun 2021 18:12:03 +0000 (03:12 +0900)]
cmd/compile/internal/abi: fix typo in comment

Change-Id: I196045314b2b0e908d7b31ac0cea5b25404f3ee0
Reviewed-on: https://go-review.googlesource.com/c/go/+/325249
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Trust: Keith Randall <khr@golang.org>

3 years agonet/http: fix ResponseWriter.ReadFrom with short reads
Damien Neil [Fri, 12 Mar 2021 21:53:11 +0000 (13:53 -0800)]
net/http: fix ResponseWriter.ReadFrom with short reads

CL 249238 changes ResponseWriter.ReadFrom to probe the source with
a single read of sniffLen bytes before writing the response header.
If the source returns less than sniffLen bytes without reaching
EOF, this can cause Content-Type and Content-Length detection to
fail.

Fix ResponseWrite.ReadFrom to copy a full sniffLen bytes from
the source as a probe.

Drop the explicit call to w.WriteHeader; writing the probe will
trigger a WriteHeader call.

Consistently use io.CopyBuffer; ReadFrom has already acquired a
copy buffer, so it may as well use it.

Fixes #44953.

Change-Id: Ic49305fb827a2bd7da4764b68d64b797b5157dc0
Reviewed-on: https://go-review.googlesource.com/c/go/+/301449
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
3 years agoos: avoid finalizer race in windows process object
Jason A. Donenfeld [Tue, 25 May 2021 14:24:41 +0000 (16:24 +0200)]
os: avoid finalizer race in windows process object

If proc.Release is called concurrently, a handle will be double-freed.

Change-Id: I0c0c32e312e07bc8615e0bf9e9b691214444d8d5
Reviewed-on: https://go-review.googlesource.com/c/go/+/322510
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
3 years agoos: terminate windows processes via handle directly
Jason A. Donenfeld [Tue, 25 May 2021 14:23:16 +0000 (16:23 +0200)]
os: terminate windows processes via handle directly

We already have a handle to the process, so use that for termination,
rather than doing a new lookup based on the PID.

Change-Id: I2958c1817f12f3dd783412baacbf629049f6956a
Reviewed-on: https://go-review.googlesource.com/c/go/+/322509
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
3 years agosyscall: regenerate zsyscall_windows.go
Bryan C. Mills [Fri, 4 Jun 2021 14:56:06 +0000 (10:56 -0400)]
syscall: regenerate zsyscall_windows.go

The declaration order in CL 319310 does not match what the generator
produces from scratch. That currently causes
cmd/internal/moddeps.TestAllDependencies to fail, since it is
explicitly checking for that kind of skew.

Updates #45914

Change-Id: If2a9cabc3d54e21deba7cb438fa364df205f38ac
Reviewed-on: https://go-review.googlesource.com/c/go/+/325112
Trust: Bryan C. Mills <bcmills@google.com>
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>

3 years agodoc/go1.17: document testing changes for Go 1.17
Aaron Sheah [Thu, 3 Jun 2021 17:43:36 +0000 (17:43 +0000)]
doc/go1.17: document testing changes for Go 1.17

For #44513. Fixes #46024

Change-Id: Icf3877d1fcd67448fbc79a0ce3db3f319ad4a0e9
GitHub-Last-Rev: 8c015935c2e376134d81aa577bffdca7fc03170d
GitHub-Pull-Request: golang/go#46324
Reviewed-on: https://go-review.googlesource.com/c/go/+/322109
Reviewed-by: Heschi Kreinick <heschi@google.com>
Trust: Jeremy Faller <jeremy@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>

3 years agosyscall: do not pass console handles to PROC_THREAD_ATTRIBUTE_HANDLE_LIST on Windows 7
Jason A. Donenfeld [Thu, 13 May 2021 11:19:14 +0000 (13:19 +0200)]
syscall: do not pass console handles to PROC_THREAD_ATTRIBUTE_HANDLE_LIST on Windows 7

On Windows 7 (and below), console handles are not real kernel handles
but are rather userspace objects, with information passed via special
bits in the handle itself. That means they can't be passed in
PROC_THREAD_ATTRIBUTE_HANDLE_LIST, even though they can be inherited.
So, we filter the list passed to PROC_THREAD_ATTRIBUTE_HANDLE_LIST to
not have any console handles on Windows 7. At the same time, it turns
out that the presence of a NULL handle in the list is enough to render
PROC_THREAD_ATTRIBUTE_HANDLE_LIST completely useless, so filter these
out too. Console handles also can't be duplicated into parent processes,
as inhertance always happens from the present process, so duplicate
always into the present process even when a parent process is specified.

Fixes #45914.

Change-Id: I70b4ff4874dbf0507d9ec9278f63b9b4dd4f1999
Reviewed-on: https://go-review.googlesource.com/c/go/+/319310
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Trust: Alex Brainman <alex.brainman@gmail.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
3 years agocmd/compile,go/types: restrict use of unsafe.{Add,Slice} to go1.17 or newer
Matthew Dempsky [Wed, 2 Jun 2021 19:22:50 +0000 (12:22 -0700)]
cmd/compile,go/types: restrict use of unsafe.{Add,Slice} to go1.17 or newer

This CL updates cmd/compile (including types2) and go/types to report
errors about using unsafe.Add and unsafe.Slice when language
compatibility is set to Go 1.16 or older.

Fixes #46525.

Change-Id: I1bfe025a672d9f4b929f443064ad1effd38d0363
Reviewed-on: https://go-review.googlesource.com/c/go/+/324369
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Matthew Dempsky <mdempsky@google.com>

3 years agocmd/compile: remove spurious ir.Dump
Matthew Dempsky [Fri, 4 Jun 2021 01:00:53 +0000 (18:00 -0700)]
cmd/compile: remove spurious ir.Dump

This ir.Dump call is a debugging artifact introduced in
golang.org/cl/274103, which should never be printed for valid,
non-generic code, but evidently can now sometimes appear due to how
the parser handles invalid syntax.

The parser should probably not recognize "x[2]" as a type expression
in non-generics mode, but also probably we shouldn't try noding after
reporting syntax errors. Either way, this diagnostic has outlived its
usefulness, and noder's days are numbered anyway, so we might as well
just remove it to save end users any confusion.

Updates #46558.

Change-Id: Ib68502ef834d610b883c2f2bb11d9b385bc66e37
Reviewed-on: https://go-review.googlesource.com/c/go/+/324991
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>

3 years agocmd/link: use correct alignment in PE DWARF sections
Than McIntosh [Thu, 3 Jun 2021 18:50:10 +0000 (14:50 -0400)]
cmd/link: use correct alignment in PE DWARF sections

Set the correct section flags to insure that .debug_* sections are
using 1-byte alignment instead of the default. This seems to be
important for later versions of LLVM-mingw on windows (shows up on the
windows/arm64 builder).

Updates #46406.

Change-Id: I023d5208374f867552ba68b45011f7990159868f
Reviewed-on: https://go-review.googlesource.com/c/go/+/324763
Trust: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Go Bot <gobot@golang.org>

3 years agoruntime: avoid gp.lockedm race in exitsyscall0
Michael Pratt [Wed, 2 Jun 2021 21:44:43 +0000 (17:44 -0400)]
runtime: avoid gp.lockedm race in exitsyscall0

Following https://golang.org/cl/291329, exitsyscall0 accesses gp.lockedm
after releasing gp to the global runq. This creates a race window where
another M may schedule the (unlocked) G, which subsequently calls
LockOSThread, setting gp.lockedm and thus causing exitsyscall0 to think
it should call stoplockedm.

Avoid this race by checking if gp is locked before releasing it to the
global runq.

Fixes #46524

Change-Id: I3acdaf09e7a2178725adbe61e985130e9ebd0680
Reviewed-on: https://go-review.googlesource.com/c/go/+/324350
Trust: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
3 years agonet: don't rely on system hosts in TestCVE202133195
Roland Shoemaker [Wed, 2 Jun 2021 16:20:22 +0000 (09:20 -0700)]
net: don't rely on system hosts in TestCVE202133195

Also don't unnecessarily deref the error return.

Fixes #46504

Change-Id: I22d14ac76776f8988fa0774bdcb5fcd801ce0185
Reviewed-on: https://go-review.googlesource.com/c/go/+/324190
Trust: David Chase <drchase@google.com>
Trust: Damien Neil <dneil@google.com>
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
3 years agoio/fs: minor corrections to Sub docs
Ian Lance Taylor [Thu, 25 Feb 2021 16:21:52 +0000 (08:21 -0800)]
io/fs: minor corrections to Sub docs

Fixes #44376

Change-Id: I9cd21adb9d4d434c3d8b8eb8af3042b70c763ea1
Reviewed-on: https://go-review.googlesource.com/c/go/+/296389
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
3 years agodoc/go1.17: remove runtime section
Jeremy Faller [Wed, 2 Jun 2021 15:20:40 +0000 (11:20 -0400)]
doc/go1.17: remove runtime section

Updates #44513

Change-Id: I359d56fc3eeece3005f092cca2cb485664affc23
Reviewed-on: https://go-review.googlesource.com/c/go/+/324209
Trust: Jeremy Faller <jeremy@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
3 years agodoc/go1.17: mention SYS_WAIT6/WEXITED on NetBSD
Ian Lance Taylor [Sat, 29 May 2021 00:28:12 +0000 (17:28 -0700)]
doc/go1.17: mention SYS_WAIT6/WEXITED on NetBSD

For #13987
For #16028
For #44513

Change-Id: I7a73446fcc80a01fa6de24eec1e5b993e543be37
Reviewed-on: https://go-review.googlesource.com/c/go/+/323489
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
3 years agocmd/link: recognize clang linker error in testCGOLTO
Ian Lance Taylor [Wed, 2 Jun 2021 14:43:57 +0000 (07:43 -0700)]
cmd/link: recognize clang linker error in testCGOLTO

Also recognize a case in which GCC does not run (from
https://build.golang.org/log/7f6d8b35c905b9829f05906beccca44f208aa569).

Fixes #46517

Change-Id: I4fe4164a5df92b2dec08fd767f65a4d5479f3f36
Reviewed-on: https://go-review.googlesource.com/c/go/+/324169
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
3 years agodoc/go1.17: document time changes for Go1.17
Uddeshya Singh [Fri, 7 May 2021 07:48:05 +0000 (13:18 +0530)]
doc/go1.17: document time changes for Go1.17

Documents the newly implemented changes of
- Time.IsDST() method
- Addition of Time.UnixMilli, Time.UnixMicro and to-Time helpers UnixMicro, UnixMilli methods
- Addition of comma "," support as separator for fraction seconds

For #44513
Fixes #46026

Change-Id: Ib8d3449d3b061f013112d33362b50e68ad6ddffa
Reviewed-on: https://go-review.googlesource.com/c/go/+/317913
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
3 years agodoc/go1.17: document flag changes for Go 1.17
KimMachineGun [Sun, 23 May 2021 14:05:15 +0000 (14:05 +0000)]
doc/go1.17: document flag changes for Go 1.17

For #44513
Fixes #46010

Change-Id: I1fe638e5db0b4f3b64dbfbd948154a7c7a80afc9
GitHub-Last-Rev: d5bd53b1df202329661ffb1818803f2ec1d3f57a
GitHub-Pull-Request: golang/go#46150
Reviewed-on: https://go-review.googlesource.com/c/go/+/319273
Reviewed-by: Heschi Kreinick <heschi@google.com>
Trust: Robert Findley <rfindley@google.com>

3 years agoruntime/internal/sys: generate //go:build lines in gengoos.go
Tobias Klauser [Tue, 1 Jun 2021 10:22:12 +0000 (12:22 +0200)]
runtime/internal/sys: generate //go:build lines in gengoos.go

For #41184

Change-Id: If7a1c3980f47bc28d0a13fe497eaba6178c65c91
Reviewed-on: https://go-review.googlesource.com/c/go/+/323750
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
3 years agocmd/link: move issue 43830 tests out of TestScript
Ian Lance Taylor [Tue, 1 Jun 2021 21:58:36 +0000 (14:58 -0700)]
cmd/link: move issue 43830 tests out of TestScript

These tests pass or fail depending on the exact compiler version,
which the TestScript tests don't support. Rewrite into Go.

For #43830
For #46295

Change-Id: I91b61dfe329d518e461ee56f186f0e9b42858e77
Reviewed-on: https://go-review.googlesource.com/c/go/+/324049
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
3 years agoruntime: fix formatting
Keith Randall [Wed, 2 Jun 2021 00:00:22 +0000 (17:00 -0700)]
runtime: fix formatting

Fix up a gofmt complaint from CL 310591.

Change-Id: I73534ef064a4cfc53539e5e65a8653e2cd684c64
Reviewed-on: https://go-review.googlesource.com/c/go/+/324090
Trust: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>

3 years agocmd/go: add declaration to cgo_lto_issue43830 test
Ian Lance Taylor [Tue, 1 Jun 2021 20:47:42 +0000 (13:47 -0700)]
cmd/go: add declaration to cgo_lto_issue43830 test

This permits the test to work in C99 mode.

For #43830

Change-Id: Ide54bd62239cfe602e2664300f04e472df5daf43
Reviewed-on: https://go-review.googlesource.com/c/go/+/324009
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>

3 years agocmd/link, cmd/cgo: support -flto in CFLAGS
Ian Lance Taylor [Tue, 25 May 2021 23:31:41 +0000 (16:31 -0700)]
cmd/link, cmd/cgo: support -flto in CFLAGS

The linker now accepts unrecognized object files in external linking mode.
These objects will simply be passed to the external linker.
This permits using -flto which can generate pure byte code objects,
whose symbol table the linker does not know how to read.

The cgo tool now passes -fno-lto when generating objects whose symbols
it needs to read. The cgo tool now emits matching types in different
objects, so that the lto linker does not report a mismatch.

This is based on https://golang.org/cl/293290 by Derek Parker.

For #43505
Fixes #43830
Fixes #46295

Change-Id: I6787de213417466784ddef5af8899e453b4ae1ad
Reviewed-on: https://go-review.googlesource.com/c/go/+/322614
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
3 years agoA+C: update name
OneOfOne [Fri, 21 May 2021 20:29:46 +0000 (15:29 -0500)]
A+C: update name

Change-Id: I1f88304858da5147bfd082c2fc2b7d24ed371cd8
Reviewed-on: https://go-review.googlesource.com/c/go/+/321955
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
3 years agodoc/go1.17: add release notes for register ABI
Cherry Mui [Thu, 27 May 2021 14:13:00 +0000 (10:13 -0400)]
doc/go1.17: add release notes for register ABI

Also delete the TODO for the linker section.

Updates #44513.
Updates #40724.

Change-Id: I4d62a907e8c3070831a052cdfe1e21648698df12
Reviewed-on: https://go-review.googlesource.com/c/go/+/323289
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
3 years agocmd/go: add [-src] to documentation
Vitaly Zdanevich [Sat, 29 May 2021 13:49:51 +0000 (13:49 +0000)]
cmd/go: add [-src] to documentation

Change-Id: I554b5021386575af6ff44571a95bb31b38a0547f
GitHub-Last-Rev: 20aaec3aa0baee6112fc2e4d72e83f78b72a44ea
GitHub-Pull-Request: golang/go#45956
Reviewed-on: https://go-review.googlesource.com/c/go/+/317109
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Trust: Bryan C. Mills <bcmills@google.com>

3 years agocmd/go: make 'go get' save sums for incidentally updated modules
Jay Conrod [Wed, 26 May 2021 19:29:39 +0000 (15:29 -0400)]
cmd/go: make 'go get' save sums for incidentally updated modules

When 'go get' updates a module, it may update another module in the
build list that provides a package in 'all' that wasn't loaded as part
of the 'go get' command. If 'go get' doesn't add a sum for that
module, builds may fail later.

With this change, 'go get' will fetch a sum for the content of an
updated module if we had a sum for the version before the update.

'go get' won't load the complete package graph, so there are still
cases where the build may be broken, like when an updated (but not
loaded) package imports a package from a new module.

Fixes #44129

Change-Id: I62eba3df4137a3e84e2ca8d549c36eec3670f08c
Reviewed-on: https://go-review.googlesource.com/c/go/+/322832
Trust: Jay Conrod <jayconrod@google.com>
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>

3 years agogo/types: don't declare 'comparable' when typeparams are disabled
Rob Findley [Sun, 30 May 2021 02:14:12 +0000 (22:14 -0400)]
go/types: don't declare 'comparable' when typeparams are disabled

Fixes #46453

Change-Id: I92b9b1e43ec5182162b2eeeb667f1f548ea373a5
Reviewed-on: https://go-review.googlesource.com/c/go/+/323609
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
3 years agogo/types: unexport the GoVersion configuration option for Go 1.17
Rob Findley [Fri, 28 May 2021 15:58:05 +0000 (11:58 -0400)]
go/types: unexport the GoVersion configuration option for Go 1.17

The GoVersion field was added to types.Config as part of the work on
type parameters. Specifically, it was added to be consistent with
cmd/compile/internal/types2, which requires such an option.

This configuration option is useful, but is also non-trivial and did not
go through the proposal process. Unexport it for Go 1.17; we can create
a proposal to export it for Go 1.18.

Fixes #46296

Change-Id: Id82d8a7096887dcfc404c4d6d8da9c761b316609
Reviewed-on: https://go-review.googlesource.com/c/go/+/323430
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
3 years agodoc/go1.17: mention time.Layout
Ian Lance Taylor [Sat, 29 May 2021 00:32:15 +0000 (17:32 -0700)]
doc/go1.17: mention time.Layout

For #44513

Change-Id: Id4624e977654f7e8c489508a9dce98c9fab621a6
Reviewed-on: https://go-review.googlesource.com/c/go/+/323490
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
3 years agodoc/go1.17: document text/template/parse.SkipFuncCheck
Ariel Mashraki [Mon, 19 Apr 2021 19:26:47 +0000 (22:26 +0300)]
doc/go1.17: document text/template/parse.SkipFuncCheck

Documents the newly added mode that skips type checking
functions as per CL 301493.

Fixes #46025
For #34652
For #44513
For #38627

Change-Id: I56c4f65924702a931944796e39f43cfeb66abc8a
Reviewed-on: https://go-review.googlesource.com/c/go/+/311569
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Trust: Michael Knyszek <mknyszek@google.com>

3 years agodoc/go1.17: mention new definitions of MSG_CMSG_CLOEXEC
Ian Lance Taylor [Fri, 28 May 2021 00:25:43 +0000 (17:25 -0700)]
doc/go1.17: mention new definitions of MSG_CMSG_CLOEXEC

For #44513

Change-Id: I8c0070b116ee520a76726eb9d3dcbdd489a1fb1f
Reviewed-on: https://go-review.googlesource.com/c/go/+/323351
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
3 years agodoc/go1.17: mention testing.[TB].Setenv methods
Ian Lance Taylor [Fri, 28 May 2021 00:33:01 +0000 (17:33 -0700)]
doc/go1.17: mention testing.[TB].Setenv methods

For #41260
For #44513

Change-Id: I47ac0c751dafeb05abfe66fdf77938774164915f
Reviewed-on: https://go-review.googlesource.com/c/go/+/323353
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: roger peppe <rogpeppe@gmail.com>
3 years agodoc/go1.17: mention new Windows SysProcAttr fields
Ian Lance Taylor [Fri, 28 May 2021 00:30:08 +0000 (17:30 -0700)]
doc/go1.17: mention new Windows SysProcAttr fields

For #44011
For #44513

Change-Id: I512466f2e775e36098eb36ca7ef82333cd9e632a
Reviewed-on: https://go-review.googlesource.com/c/go/+/323352
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
3 years agodoc/go1.17: document new go/build/BuildContext.ToolTags field
Ian Lance Taylor [Fri, 28 May 2021 00:19:12 +0000 (17:19 -0700)]
doc/go1.17: document new go/build/BuildContext.ToolTags field

For #44513

Change-Id: Ib21af742e574fcaa7e38bb437d42dbeed9d01f0b
Reviewed-on: https://go-review.googlesource.com/c/go/+/323350
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
3 years agodoc/go1.17: mention new encoding/csv/Reader.FieldPos method
Ian Lance Taylor [Thu, 27 May 2021 23:24:49 +0000 (16:24 -0700)]
doc/go1.17: mention new encoding/csv/Reader.FieldPos method

For #44221
For #44513

Change-Id: I2d2d1c55255f4411c11fd51f0f3ae726cbf4d136
Reviewed-on: https://go-review.googlesource.com/c/go/+/323349
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: roger peppe <rogpeppe@gmail.com>
3 years agodoc/go1.17: document new debug/elf constant
Ian Lance Taylor [Thu, 27 May 2021 23:16:37 +0000 (16:16 -0700)]
doc/go1.17: document new debug/elf constant

For #39677
For #44513

Change-Id: I8c4193fd4359b83e6739e7e30a3a42b5f21b0f1a
Reviewed-on: https://go-review.googlesource.com/c/go/+/323275
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
3 years agogo/ast: remove FuncDecl.IsMethod for Go 1.17
Rob Findley [Fri, 28 May 2021 02:27:55 +0000 (22:27 -0400)]
go/ast: remove FuncDecl.IsMethod for Go 1.17

The IsMethod method was added to FuncDecl in the process of working on
support for type parameters, but is now only used in one place. It also
didn't go through the proposal process. Remove it for 1.17.

Also clean up a doc comment that mentioned type parameters.

Fixes #46297

Change-Id: I432bdd626324f613baf059540b7c5436985b2b16
Reviewed-on: https://go-review.googlesource.com/c/go/+/323369
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
3 years agodoc/go1.17: clarify that compress/lzw Reader and Writer types are new
Ian Lance Taylor [Thu, 27 May 2021 23:12:12 +0000 (16:12 -0700)]
doc/go1.17: clarify that compress/lzw Reader and Writer types are new

For #26535
For #44513
For #46005

Change-Id: I70d3711ab6451a61b526abb3da8e91243f637656
Reviewed-on: https://go-review.googlesource.com/c/go/+/323273
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
3 years agonet/http: correct Client.Do doc about context cancelation
Manlio Perillo [Thu, 27 May 2021 08:44:57 +0000 (10:44 +0200)]
net/http: correct Client.Do doc about context cancelation

The documentation of the Client.Do method and Get function incorrectly
stated that, in case of context cancelation, the returned url.Error
Timeout method returns true.

Update the documentation to correctly match the implementation.
See also CL 200798 that, due to an oversight, corrected only the
documentation of the Client.Get method.

Remove a TODO note added in CL 125575 (net/http: document that Client
methods always return *url.Error), since it is no longer applicable
after CL 200798 (net/http: fix and lock-in Client.Do docs on request
cancelation).

Fixes #46402

Change-Id: Ied2ee971ba22b61777762dbb19f16e08686634ca
Reviewed-on: https://go-review.googlesource.com/c/go/+/323089
Reviewed-by: Damien Neil <dneil@google.com>
Trust: Michael Knyszek <mknyszek@google.com>

3 years agodoc/go1.17: document reflect changes
Damien Neil [Thu, 27 May 2021 01:06:26 +0000 (18:06 -0700)]
doc/go1.17: document reflect changes

For #44513.
Fixes #46019.

Change-Id: Ica84edd5703a4ccf343ff01e10483f8d51d1c79f
Reviewed-on: https://go-review.googlesource.com/c/go/+/323069
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
3 years agocmd/go: don't let 'go mod download' save sums for inconsistent requirements
Jay Conrod [Mon, 24 May 2021 20:47:45 +0000 (16:47 -0400)]
cmd/go: don't let 'go mod download' save sums for inconsistent requirements

'go mod download' calls modload.LoadModFile early to find the main
module path in order to validate arguments. LoadModFile may write
go.mod and go.sum to fix formatting and add a go directive. This calls
keepSums, which, in eager mode, loaded the complete module graph in
order to find out what sums are needed to load the complete module
graph. If go.mod requires a lower version of a module than will be
selected later, keepSums causes the sum for that version's go.mod to
be retained, even though it isn't needed later after a consistent
go.mod is written.

This CL fixes keepSums not to load the graph if it hasn't already been
loaded (whether eager or lazy), addressing comments from CL 318629.

For #45332

Change-Id: I20d4404004e4ad335450fd0fd753e7bc0060f702
Reviewed-on: https://go-review.googlesource.com/c/go/+/322369
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>

3 years agonet: verify results from Lookup* are valid domain names
Roland Shoemaker [Thu, 27 May 2021 17:40:06 +0000 (10:40 -0700)]
net: verify results from Lookup* are valid domain names

For the methods LookupCNAME, LookupSRV, LookupMX, LookupNS, and
LookupAddr check that the returned domain names are in fact valid DNS
names using the existing isDomainName function.

Thanks to Philipp Jeitner and Haya Shulman from Fraunhofer SIT for
reporting this issue.

Fixes #46241
Fixes CVE-2021-33195

Change-Id: I47a4f58c031cb752f732e88bbdae7f819f0af4f3
Reviewed-on: https://go-review.googlesource.com/c/go/+/323131
Trust: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
3 years agocmd/compile: improve debug locations for partially live in-params
Than McIntosh [Mon, 10 May 2021 11:31:57 +0000 (07:31 -0400)]
cmd/compile: improve debug locations for partially live in-params

During DWARF debug location generation, as a preamble to the main data
flow analysis, examine the function entry block to look for in-params
arriving in registers that are partially or completely dead, and
insert new OpArg{Int,Float}Reg values for the dead or partially-dead
pieces. In addition, add entries to the f.NamedValues table for
incoming live register-resident params that don't already have
entries. This helps create better/saner DWARF location expressions for
params. Example:

  func foo(s string, used int, notused int) int {
      return len(s) + used
  }

When optimization is complete for this function, the parameter
"notused" is completely dead, meaning that there is no entry for it in
the f.NamedValues table (which then means we don't emit a DWARF
variable location expression for it in the function enty block). In
addition, since only the length field of "s" is used, there is no
DWARF location expression for the other component of "s", leading to
degraded DWARF.

There are still problems/issues with DWARF location generation, but
this does improve things with respect to being able to print the
values of incoming parameters when stopped in the debugger at the
entry point of a function (when optimization is enabled).

Updates #40724.

Change-Id: I5bb5253648942f9fd33b081fe1a5a36208e75785
Reviewed-on: https://go-review.googlesource.com/c/go/+/322631
Trust: Than McIntosh <thanm@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
3 years agocmd/compile: place reg spills after OpArg{Int,Float}Reg ops
Than McIntosh [Tue, 25 May 2021 14:13:07 +0000 (10:13 -0400)]
cmd/compile: place reg spills after OpArg{Int,Float}Reg ops

Tweak the register allocator to maintain the invariant that
OpArg{Int,Float}Reg values are placed together at the start of the
entry block, before any other non-pseudo-op values. Without this
change, when the register allocator adds spills we can wind up with an
interleaving of OpArg*Reg and stores, which complicates debug location
analysis.

Updates #40724.

Change-Id: Icf30dd814a9e25263ecbea2e48feb840a6e7f2bd
Reviewed-on: https://go-review.googlesource.com/c/go/+/322630
Trust: Than McIntosh <thanm@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
3 years agocmd/link: accept Windows line-ending in TestTrampolineCgo
Cherry Mui [Thu, 27 May 2021 14:11:42 +0000 (10:11 -0400)]
cmd/link: accept Windows line-ending in TestTrampolineCgo

Apparently C printf emits "\r\n" on Windows. Accept that.

Change-Id: If87ba41435e3147d3892cfc3fe3a105b066ff0aa
Reviewed-on: https://go-review.googlesource.com/c/go/+/322973
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
3 years agogo/types: guard against check==nil in newNamed
Rob Findley [Thu, 27 May 2021 16:35:01 +0000 (12:35 -0400)]
go/types: guard against check==nil in newNamed

When importing generic named types, it is possible for Checker.newNamed
to be called during type instantiation when the Checker is nil.

In this case we should be able to safely skip this delayed expansion.

Updates #45580

Change-Id: I75422100464d57eba24642c93e06e8b47d904fc3
Reviewed-on: https://go-review.googlesource.com/c/go/+/322974
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
3 years agoRevert "net: verify results from Lookup* are valid domain names"
Roland Shoemaker [Thu, 27 May 2021 15:14:18 +0000 (15:14 +0000)]
Revert "net: verify results from Lookup* are valid domain names"

This reverts commit c89f1224a544cde464fcb86e78ebb0cc97eedba2.

Reason for revert: reverting so we can apply follow-up fixes and do a single cherry pick.

Change-Id: I16c6283a0bcab056216f330fb98fa3b5f2b0780c
Reviewed-on: https://go-review.googlesource.com/c/go/+/323129
Reviewed-by: Katie Hockman <katie@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>

3 years agonet/http/httputil: always remove hop-by-hop headers
Filippo Valsorda [Fri, 21 May 2021 18:02:30 +0000 (14:02 -0400)]
net/http/httputil: always remove hop-by-hop headers

Previously, we'd fail to remove the Connection header from a request
like this:

    Connection:
    Connection: x-header

Fixes #46313
Fixes CVE-2021-33197

Change-Id: Ie3009e926ceecfa86dfa6bcc6fe14ff01086be7d
Reviewed-on: https://go-review.googlesource.com/c/go/+/321929
Run-TryBot: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
Trust: Katie Hockman <katie@golang.org>
Trust: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>

3 years agocmd/go,cmd/link: do not check for staleness in most tests
Bryan C. Mills [Tue, 25 May 2021 16:21:11 +0000 (12:21 -0400)]
cmd/go,cmd/link: do not check for staleness in most tests

Instead, check that stale packages in the standard library
are not rebuilt when already present in the build cache,
and are not installed implicitly when rebuilt.

We retain the staleness checks for the runtime package in tests
involving '-i', because those are guaranteed to fail anyway if the
package is stale and the "stale" failure message is arguably clearer.
They can be removed if/when we remove the '-i' flag, but the runtime
package is less likely to become stale because it does not have cgo
dependencies.

Fixes #46347
Updates #33598
Updates #35459
Updates #41696

Change-Id: I7b0a808addd930f9f4911ff53ded62272af75a40
Reviewed-on: https://go-review.googlesource.com/c/go/+/322629
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
3 years agocrypto/elliptic: fix typo in p521Point type name
Filippo Valsorda [Thu, 13 May 2021 17:45:55 +0000 (13:45 -0400)]
crypto/elliptic: fix typo in p521Point type name

Change-Id: I6cab3624c875d9a70441a560e84f91c9b2df17b9
Reviewed-on: https://go-review.googlesource.com/c/go/+/320070
Trust: Filippo Valsorda <filippo@golang.org>
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Filippo Valsorda <filippo@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
3 years agoos: deflake TestFdReadRace
Ian Lance Taylor [Wed, 26 May 2021 22:17:27 +0000 (15:17 -0700)]
os: deflake TestFdReadRace

The test would hang if the call to Fd set the pipe to be non-blocking
before the Read entered the first read system call. Avoid that problem
by writing data to the pipe to wake up the read.

For #24481
Fixes #44818

Change-Id: I0b798874c7b81e7308a38ebbf657efc4392ffacd
Reviewed-on: https://go-review.googlesource.com/c/go/+/322893
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
3 years agosrc/os: revert accidentally submitted change
Damien Neil [Wed, 26 May 2021 22:44:46 +0000 (15:44 -0700)]
src/os: revert accidentally submitted change

Change-Id: Ib34984a6bd0abc76266e8aac96f9f8ad8ae21d17
Reviewed-on: https://go-review.googlesource.com/c/go/+/322894
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
3 years agodoc/go1.17: document net/... changes
Damien Neil [Wed, 26 May 2021 18:28:01 +0000 (11:28 -0700)]
doc/go1.17: document net/... changes

For #44513.
Fixes #46014.
Fixes #46015.
Fixes #46016.
Fixes #46017.

Change-Id: I356483d68d07159281dfe2ea1e49430ddf200973
Reviewed-on: https://go-review.googlesource.com/c/go/+/322891
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
3 years agodoc/go1.17: document syscall changes
Damien Neil [Wed, 26 May 2021 18:12:43 +0000 (11:12 -0700)]
doc/go1.17: document syscall changes

Fixes #46023

Change-Id: Ia63829d03afb0936862b16f0971175cbaa1095bc
Reviewed-on: https://go-review.googlesource.com/c/go/+/322890
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
3 years agomime: document use of the Shared MIME-Info Database
Damien Neil [Wed, 26 May 2021 20:43:15 +0000 (13:43 -0700)]
mime: document use of the Shared MIME-Info Database

For #44513.
Fixes #46013.

Change-Id: I382603208aa94b66d5220cf0f418b8528a4e4148
Reviewed-on: https://go-review.googlesource.com/c/go/+/322892
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>