1
0
mirror of https://github.com/golang/go synced 2024-11-14 14:20:30 -07:00
Commit Graph

44052 Commits

Author SHA1 Message Date
Dmitri Shuralyov
ee379d2b08 all: treat all files as binary, but check in .bat with CRLF
This is a followup to CL 96495.

It should be simpler and more robust to achieve .bat files having
CRLF line endings by treating it as a binary file, like all other
files, and checking it in with the desired CRLF line endings.

A test is used to check the entire Go tree, short of directories
starting with "." and named "testdata", for any .bat files that
have anything other than strict CRLF line endings. This will help
catch any accidental modifications to existing .bat files or check
ins of new .bat files.

Importantly, this is compatible with how Gerrit serves .tar.gz files,
making it so that CRLF line endings are preserved.

The Go project is supported on many different environments, some of
which may have limited git implementations available, or none at all.
Relying on fewer git features and special rules makes it easier to
have confidence in the exact content of all files. Additionally, Go
development started in Subversion, moved to Perforce, then Mercurial,
and now uses Git.¹ Reducing its reliance on git-specific features will
help if there will be another transition in the project's future.

There are only 5 .bat files in the entire Go source tree, so a new one
being added is a rare event, and we prefer to do things in Go instead.
We still have the option of improving the experience for developers by
adding a pre-commit converter for .bat files to the git-codereview tool.

¹ https://groups.google.com/d/msg/golang-dev/sckirqOWepg/YmyT7dWJiocJ

Fixes #39391.
For #37791.

Change-Id: I6e202216322872f0307ac96f1b8d3f57cb901e6b
Reviewed-on: https://go-review.googlesource.com/c/go/+/236437
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2020-06-08 15:31:43 +00:00
Daniel Martí
5c6b2b14db doc/go1.15: document two noteworthy json changes
I had a look at the changes between 1.14 and master, and these are the
only two that seem relevant enough for the changelog.

There was also CL 179337 to reuse values when decoding map elements, but
it got reverted in CL 234559 and is not being included in 1.15.

Updates #37419.

Change-Id: Ib125415a953471ce29553a413d85aaf4b18a7a12
Reviewed-on: https://go-review.googlesource.com/c/go/+/236523
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-06-08 12:11:01 +00:00
Filippo Valsorda
608cdcaede all: replace usages of whitelist/blacklist and master/slave
There's been plenty of discussion on the usage of these terms in tech.
I'm not trying to have yet another debate. It's clear that there are
people who are hurt by them and who are made to feel unwelcome by their
use due not to technical reasons but to their historical and social
context. That's simply enough reason to replace them.

Anyway, allowlist and blocklist are more self-explanatory than whitelist
and blacklist, so this change has negative cost.

Didn't change vendored, bundled, and minified files. Nearly all changes
are tests or comments, with a couple renames in cmd/link and cmd/oldlink
which are extremely safe. This should be fine to land during the freeze
without even asking for an exception.

Change-Id: I8fc54a3c8f9cc1973b710bbb9558a9e45810b896
Reviewed-on: https://go-review.googlesource.com/c/go/+/236857
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Khosrow Moossavi <khos2ow@gmail.com>
Reviewed-by: Leigh McCulloch <leighmcc@gmail.com>
Reviewed-by: Urban Ishimwe <urbainishimwe@gmail.com>
2020-06-08 01:03:14 +00:00
Austin Clements
666448abeb doc/go1.15: rationalize runtime sections
Use the "Core library -> runtime" section for changes that affect the
runtime package API and use the top-level "Runtime" section for
package-independent behavior changes. Also, move the one change that's
really about os (and net) into the "os" package section and reword it
to be more accurate.

Updates #37419.

Change-Id: I32896b039f29ac67308badd0d0b36e8c6e39f64f
Reviewed-on: https://go-review.googlesource.com/c/go/+/236718
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2020-06-07 19:24:28 +00:00
Austin Clements
acdd111e32 doc/go1.15: document toolchain changes
Updates #37419.

Change-Id: I403cb12083d37359187b45c392046f307054a5b8
Reviewed-on: https://go-review.googlesource.com/c/go/+/236618
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: David Chase <drchase@google.com>
2020-06-07 19:24:13 +00:00
Carlos Amedee
fca286bed3 doc/go1.15: remove TODO intended for the Core library section
The TODO was added durring the initial creation of the document.
In the current location, it makes it seem like the tzdata documents
are incomplete when they are complete. It is understood that the
entire Core library section will be a work in progress until the release.

For #37419

Change-Id: Ic857eb0ec2583781c701985ea62e519e9d940090
Reviewed-on: https://go-review.googlesource.com/c/go/+/236760
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-06-05 23:22:11 +00:00
shaquilleq
813c9523a9 doc/go1.15: add release notes for fmt
Updates #37419

Change-Id: I344dd93ed7a75f88e7f937c80f5a6ad6c0327a07
Reviewed-on: https://go-review.googlesource.com/c/go/+/236417
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-06-05 22:52:06 +00:00
Michael Matloob
d282b0f112 doc/go1.15: add release notes for regexp
Updates #37419

Change-Id: I340efe55b9dc41bb9ef6c9f0ec158d58a9445864
Reviewed-on: https://go-review.googlesource.com/c/go/+/236738
Run-TryBot: Michael Matloob <matloob@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-06-05 19:17:58 +00:00
Brad Fitzpatrick
3c35eec618 runtime: clarify wording/grammar on GODEBUG=invalidptr
Change-Id: Ia06b6be262922991bae3528e7b061d1db9e4c3c0
Reviewed-on: https://go-review.googlesource.com/c/go/+/236679
Reviewed-by: Austin Clements <austin@google.com>
2020-06-05 19:11:07 +00:00
Rebecca Stambler
325540922a doc: update contribution guide to make it friendlier for x/ repos
The current contributor documentation is tailored towards contributors
to golang/go, but we have a number of increasingly popular x/ repos.
In this CL, I tried to generalize the language to make it apply to any
repository.

Also, I fixed an old link I noticed in editors.html.

Change-Id: Id9d8e448262ed8c3a67f49be5d554ca29df9d3c1
Reviewed-on: https://go-review.googlesource.com/c/go/+/234899
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2020-06-05 17:27:32 +00:00
Ian Lance Taylor
b44bf986a2 doc/go1.15: mention new debug/pe constants
The constants were added in CL 222637.

For #37419

Change-Id: Iae662d677d31c44a7560399ef6771f520c1f7663
Reviewed-on: https://go-review.googlesource.com/c/go/+/236682
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-06-05 17:09:20 +00:00
Dominik Honnef
890707f88b doc/go1.15: add release notes for io/ioutil
For #37419.

Change-Id: I6c7a7e9c91f7691a6ba2a7ac4dad92c64b48962f
Reviewed-on: https://go-review.googlesource.com/c/go/+/236658
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-06-05 16:56:47 +00:00
Russ Cox
b6faed1326 cmd/asm, cmd/compile, doc: document -spectre flags
Most of the docs are in the new wiki page
https://golang.org/wiki/Spectre.

Updates #37419.

Change-Id: I6e8f76670593c089de895e1665b41d874f879df9
Reviewed-on: https://go-review.googlesource.com/c/go/+/236599
Reviewed-by: Austin Clements <austin@google.com>
2020-06-05 16:54:48 +00:00
Austin Clements
76f233fe04 doc/go1.15: exclude spaces from <code> block
Per the note at the top of go1.15.html.

Updates #37419.

Change-Id: Ia6917347ca1e3ebe8c55f9c0ec74e49ff481a64f
Reviewed-on: https://go-review.googlesource.com/c/go/+/236719
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-06-05 16:51:24 +00:00
Roland Shoemaker
60cbff6f19 crypto/x509: match cgo and Apple behavior in domain fallback of macOS roots
This change makes the direct call darwin loadSystemRoots implementation
match the existing cgo implementation, which in turn _mostly_ matches
the Apple implementation. The main change here is that when
SecTrustSettingsCopyTrustSettings the error is ignored, and can either
cause a fallback to check admin trust settings, or cause the
certificate to be marked kSecTrustSettingsResultUnspecified.

As well as updating the implementation to match the cgo one, this
change also updates the documentation of how the fallbacks work and
how they match the Apple implementations. References are made to the
Apple source where appropriate. This change does not update the
existing comments in the cgo implementation, since the goal is to
delete that code once the direct call implementation is matured.

Updates #38888

Change-Id: Id0344ea9d2eede3b715f341e9cbd3c1c661b7a90
Reviewed-on: https://go-review.googlesource.com/c/go/+/233360
Run-TryBot: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2020-06-05 16:50:47 +00:00
Cherry Zhang
a38f29ad61 doc/go1.15: add release notes for RISC-V port
Change-Id: I35045925cca942980419829fe07e5e0f38cb7a91
Reviewed-on: https://go-review.googlesource.com/c/go/+/236338
Reviewed-by: Joel Sing <joel@sing.id.au>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-06-05 15:35:53 +00:00
Tobias Klauser
4489f4bc84 cmd/compile/internal: gofmt
Change-Id: I67a4375d8eb976d48e4a57e482390f473658b4b8
Reviewed-on: https://go-review.googlesource.com/c/go/+/236457
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-06-05 05:00:28 +00:00
Katie Hockman
fb86c70bda crypto/tls: set CipherSuite for VerifyConnection
The ConnectionState's CipherSuite was not set prior
to the VerifyConnection callback in TLS 1.2 servers,
both for full handshakes and resumptions.

Change-Id: Iab91783eff84d1b42ca09c8df08e07861e18da30
Reviewed-on: https://go-review.googlesource.com/c/go/+/236558
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2020-06-04 20:16:53 +00:00
Austin Clements
07ced37013 syscall: document float arguments and results on windows/amd64
Updates #6510.
Updates #37273.

Change-Id: Id2732fcff0a0c5e4a324cd33ef995c7e528f5e1a
Reviewed-on: https://go-review.googlesource.com/c/go/+/236562
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2020-06-04 17:50:16 +00:00
Austin Clements
7e47757324 syscall: hide internal comment from Syscall documentation
There's a comment on the Syscall function that's supposed to be an
internal implementation note, but since it's not separated from the
function definition, it appears in godoc. Add a blank line to prevent
this.

Change-Id: Iba307f1cc3844689ec3c6d82c21d441852e35bca
Reviewed-on: https://go-review.googlesource.com/c/go/+/236561
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2020-06-04 17:50:15 +00:00
Austin Clements
9d715e0bff doc/go1.15: 1.15 supports OpenBSD 6.7 on arm and arm64
Change-Id: Ibea6fbb73abdb7201855e80967120c07484d6460
Reviewed-on: https://go-review.googlesource.com/c/go/+/236557
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2020-06-04 17:50:14 +00:00
joshuabezaleel
b371f189df io/ioutil: update WriteFile to clarify it does not change permissions if the file exists.
The existing documentation of WriteFile does not make it clear for
non-native English speakers that it will not change the permissions if
the file already exists before.

Fixes #35711

Change-Id: If861c3e3700957fc9ac3d5313351c57d399d3f58
Reviewed-on: https://go-review.googlesource.com/c/go/+/218417
Reviewed-by: Rob Pike <r@golang.org>
2020-06-04 10:53:46 +00:00
Tobias Klauser
bffb8818e7 all: fix dead links to inferno-os bitbucket repository
Generated using:

  perl -i -npe 's#inferno-os/src/default#inferno-os/src/master#' $(git grep -l "inferno-os/src/default" | grep -v vendor)

Change-Id: I4b6443bd09a8ea4c8aaeb40a1c73520d1f7ca648
Reviewed-on: https://go-review.googlesource.com/c/go/+/235821
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Austin Clements <austin@google.com>
2020-06-04 07:25:06 +00:00
Keith Randall
f72d7cfc8f cmd/compile: add interface equality tests
Add interfaces which differ in type. Those used so far only
differ in value, not type.

These additional tests are needed to generate a failure
before CL 236278 went in.

Update #8606

Change-Id: Icdb7647b1973c2fff7e5afe2bd8b8c1b384f583e
Reviewed-on: https://go-review.googlesource.com/c/go/+/236418
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2020-06-04 06:21:55 +00:00
Julie Qiu
bdf76ca045 doc/go1.15: add release notes for time
Updates #37419

Change-Id: I2018b55f335400070bfa3573adab9549a5bf6a1a
Reviewed-on: https://go-review.googlesource.com/c/go/+/236158
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-06-04 03:50:46 +00:00
Julie Qiu
cb5fad79d0 doc/go1.15: add release notes for strconv
Updates #37419

Change-Id: Ic72bf0da914fa8a56570750b8fd4b4d09d2ed075
Reviewed-on: https://go-review.googlesource.com/c/go/+/236157
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-06-04 03:50:41 +00:00
David Chase
429d2c548d runtime: make runtime-gdb.py tolerant of creatively-named gdb versions
"Fedora" and "Red Hat" are not numbers, it turns out.
Don't rely on version numbers, instead use a regexp to
handle variation across the 2 patterns thus far observed
for gdb-generated Go type names.

Change-Id: I18c81aa2848265a47daf1180d8f6678566ae3f19
Reviewed-on: https://go-review.googlesource.com/c/go/+/236280
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-06-03 22:07:42 +00:00
Katie Hockman
23dcee6464 crypto/tls: test that Clone copies session ticket key fields
Updates #25256

Change-Id: If16c42581f1cf3500fd7fd01c915e487f8025e55
Reviewed-on: https://go-review.googlesource.com/c/go/+/235922
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2020-06-03 19:23:34 +00:00
Cherry Zhang
73dd74a9fe cmd/internal/goobj2: add referenced symbol names to object file
Currently, for symbols defined in other packages and referenced
by index, we don't record its name in the object file, as the
linker doesn't need the name, only the index. As a consequence,
tools like objdump and nm also don't know the referenced symbol
names and cannot dump it properly.

This CL adds referenced symbol names to the object file. So the
object file is self-contained. And tools can retrieve referenced
symbol names properly.

Tools now should work as good for new object files as for old
object files.

Fixes #38875.

Change-Id: I16c685c1fd83273ab1faef474e19acf4af46396f
Reviewed-on: https://go-review.googlesource.com/c/go/+/236168
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
2020-06-03 19:20:56 +00:00
Cherry Zhang
b7717e4634 Revert "cmd/internal/goobj: add index to symbol name for indexed symbols"
This reverts CL 229246.

For new indexed object files, in CL 229246 we added symbol index
to tools (nm, objdump) output. This affects external tools that
parse those outputs. And the added index doesn't look very nice.
In this release we take it out. For future releases we may
introduce a flag to tools (nm, objdump) and optionally dump the
symbol index.

For refererenced (not defined) indexed symbols, currently the
symbol is still referenced only by index, not by name. The next
CL will make the object file self-contained, so tools can dump
the symbol names properly (as before).

For #38875.

Change-Id: I07375e85a8e826e15c82fa452d11f0eaf8535a00
Reviewed-on: https://go-review.googlesource.com/c/go/+/236167
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
2020-06-03 19:20:41 +00:00
Keith Randall
9984ef824c cmd/compile: test that equality is evaluated in order
Make sure that we compare fields of structs and elements of arrays in order,
with proper short-circuiting.

Update #8606

Change-Id: I0a66ad92ea0af7bcc56dfdb275dec2b8d7e8b4fe
Reviewed-on: https://go-review.googlesource.com/c/go/+/236147
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-06-03 19:07:55 +00:00
Katie Hockman
66e35c995b crypto/tls: fix duplicate calls to VerifyConnection
Also add a test that could reproduce this error and
ensure it doesn't occur in other configurations.

Fixes #39012

Change-Id: If792b5131f312c269fd2c5f08c9ed5c00188d1af
Reviewed-on: https://go-review.googlesource.com/c/go/+/233957
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2020-06-03 19:01:50 +00:00
Than McIntosh
09e791feb1 cmd/link: new DWARF line table test case
Add a test case for an issue with how Go emits DWARF line tables,
specifically relating to the line table "end sequence" operator.

Updates #38192.

Change-Id: I878b262e6ca6c550c0e460c3d5a1969ac4a2c31b
Reviewed-on: https://go-review.googlesource.com/c/go/+/235917
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
2020-06-03 18:03:41 +00:00
Keith Randall
f98b9ae07c Revert "cmd/compile: improve equality algs for arrays of interfaces"
This reverts commit 7eab9506c9.

Reason for revert: Undoing to get back to semantics discussed in #8606.

Change-Id: If0cd7518c10c37a81fdbb4ae112239e04c0b1448
Reviewed-on: https://go-review.googlesource.com/c/go/+/236278
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2020-06-03 17:38:23 +00:00
Keith Randall
7f349e82a2 Revert "cmd/compile: improve generated eq algs for structs containing interfaces"
This reverts commit 1cc7be89a9.

Reason for revert: Undoing to get back to semantics discussed in #8606.

Change-Id: Ib44a2e79cf113b3d15c3546cd8aa6fc27860819e
Reviewed-on: https://go-review.googlesource.com/c/go/+/236146
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2020-06-03 17:38:12 +00:00
Than McIntosh
7a2632e11d doc/go1.15: add release notes for plugin
Add a blurb to the release notes mentioning that the
linker now supports DWARF generation for -buildmode=plugin,
and that plugin builds work now for freebsd/amd64.

Updates #37419.

Change-Id: I84da7a52af84a9d765f73ca7ea525e7af8d64f05
Reviewed-on: https://go-review.googlesource.com/c/go/+/236162
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-06-03 17:30:11 +00:00
David Chase
3949cae441 runtime: repair gdb printing fix for 7.12, 8.{1,2,3}.1, 9.2
Hand-verified for listed gdb versions.  Gdb (apparently)
changed the way it names certain Go types, and this change
broke the pretty-printer-activating code in runtime-gdb.py

runtime-gdb_test.go now checks channel, map, string, and slice
printing unconditionally (i.e., no opt-out for old versions).

Updates #39368.

Change-Id: I98d72e1291c66bd40d970990e1a377ff2ed0c5d2
Reviewed-on: https://go-review.googlesource.com/c/go/+/236164
Run-TryBot: David Chase <drchase@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-06-03 16:27:49 +00:00
Austin Clements
9e56bcb9fe doc/go1.15: runtime release notes
Change-Id: Ie37e993e840df2c063dee98fa3f6eca8e8713ca3
Reviewed-on: https://go-review.googlesource.com/c/go/+/236177
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-06-03 16:05:37 +00:00
fanzha02
5aaeda19c1 cmd/internal/obj/arm64: fix typos in document
The current document mismatches Go syntax loads a signed-byte
instruction "MOVB" with GNU syntax loads an 64bit double-word
instruction "ldr". This is just a typo in the document, the
assembler has the correct encoding. This patch fix this error.

Fixes #39367

Change-Id: Idb8f65ca540514ee5bc8f07073e756838710ba93
Reviewed-on: https://go-review.googlesource.com/c/go/+/236217
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-06-03 14:51:34 +00:00
Than McIntosh
58f017bcea cmd/{compile,link}: fix problem with DWARF end_sequence ops
During DWARF line table emission in the linker, prior to issuing a
DW_LNE_end_sequence op to mark the end of the line table for a
compilation unit, advance the PC to produce an address beyond the last
text address in the unit (this is required by the DWARF standard).
Because of the way that GDB interprets end-sequence ops, we were
effectively losing the last row in the line table for each unit, which
degraded the debugging experience.

This problem has been around for a while, but has surfaced recently
due to changes in line table generation. Prior to Go 1.14, the DWARF
line table was emitted entirely in the linker, and a single monolithic
line table was created for each Go package (including functions from
assembly). In 1.14 we moved to having the compiler emit line table
fragments for each function, and having the linker stitch together the
fragments. As part of this change we moved to a model in which each
"go tool compile/asm" output has its own DWARF line table instance,
meaning that there are many more "end sequence" ops, which made the
problem more visible.

Fixes #38192.

Change-Id: Ic29e2f6e0ac952360c81fcba5268ad70b2b44184
Reviewed-on: https://go-review.googlesource.com/c/go/+/235739
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
2020-06-03 14:08:41 +00:00
Than McIntosh
9326d71874 doc/go1.15: add release notes for new linker
Add a blurb to the release notes describing improvements made to the
Go linker in the most recent development cycle.

Updates #37419.

Change-Id: I3b870f0c00efc0b7b33aab2631d8c4e1c273922d
Reviewed-on: https://go-review.googlesource.com/c/go/+/236159
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-06-03 12:20:34 +00:00
Ian Lance Taylor
9b90491e4a runtime: steal timers from running P's
Previously we did not steal timers from running P's, because that P
should be responsible for running its own timers. However, if the P
is running a CPU-bound G, this can cause measurable delays in running
ready timers. Also, in CL 214185 we avoided taking the timer lock of a P
with no ready timers, which reduces the chances of timer lock contention.

So, if we can't find any ready timers on sleeping P's, try stealing
them from running P's.

Fixes #38860

Change-Id: I0bf1d5dc56258838bdacccbf89493524e23d7fed
Reviewed-on: https://go-review.googlesource.com/c/go/+/232199
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2020-06-03 05:33:54 +00:00
Andrew G. Morgan
9bbe899576 cmd/go: add -Wl,-wrap,symbol to linker flag whitelist
This is needed for cgo support for libpsx.

Fixes: #39361
Change-Id: I500f5614ea4b82b085322af1f1ffeb1f55270a05
Reviewed-on: https://go-review.googlesource.com/c/go/+/236139
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-06-03 02:59:25 +00:00
Jean de Klerk
ba6ccf3b04 testing: capture testname on --- PASS and --- FAIL lines
This fixes an issue raised at https://github.com/golang/go/issues/38458#issuecomment-635617670
in which --- PASS and --- FAIL lines would not trigger --- CONT lines
of other tests.

Change-Id: I0d8cc54d682a370d0a6ea6816a11b2e462a92efe
Reviewed-on: https://go-review.googlesource.com/c/go/+/235997
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2020-06-02 22:57:03 +00:00
David Golden
a9cc1051c1 time: note that formats may parse invalid strings
The existing documentation for time format constants doesn't mention
that they may parse technically-invalid strings, such as single-digit
hours when a two-digit hour is required by a specification.  This commit
adds a short warning note to that effect.

Fixes #37616

Change-Id: I6e5e12bd42dc368f8ca542b4c0527a2b7d30acaf
Reviewed-on: https://go-review.googlesource.com/c/go/+/229460
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-06-02 22:20:47 +00:00
David Chase
ee776b4126 runtime: repair slice, string, and channel printing in gdb
"Something" changed the names of types in gdb, causing the
pretty-printer matchers to fail to match.  This tracks that
change.

Updated runtime-gdb_test.go to include a slice and a channel printing test.

(The straightforward printing of a slicevar doesn't work because
of compiler DWARF problems describing the slicevar, not gdb problems).

Change-Id: I21607a955b9c894f11ecf3763aea2a6dd59a3f42
Reviewed-on: https://go-review.googlesource.com/c/go/+/235926
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
2020-06-02 21:19:07 +00:00
Ian Lance Taylor
1193958d6b cmd: update golang.org/x/tools to v0.0.0-20200601175630-2caf76543d99
This teaches vet to recognize %O in a fmt.Printf format string.
O has been supported since the 1.13 release, but vet would warn about it.

Fixes #29986

Change-Id: I3a7a1fc8141f32888c081c5d92620461624371f6
Reviewed-on: https://go-review.googlesource.com/c/go/+/236138
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-06-02 20:59:16 +00:00
Jay Conrod
c082c1fea3 doc/go1.15: remove TODOs for tools and go command sections
For #37419

Change-Id: I35a5cf86ff09a3962959627dce58155b26ad4748
Reviewed-on: https://go-review.googlesource.com/c/go/+/236160
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2020-06-02 20:44:05 +00:00
Roland Shoemaker
ed2996bac7 crypto/x509: document support for leading periods in DNS constraints
This change adds a comment to the Verify documentation that indicates
that you can use URI and email style name constraints with a leading
period for DNS names (and explains what they do). This behavior is
not standards compliant, but matches the community application of
RFC 5280, so it makes sense to document it.

Fixes #37535

Change-Id: Ibd6f039e4fa46d40ad7ae1ab48eab86f13cf8eff
Reviewed-on: https://go-review.googlesource.com/c/go/+/233525
Reviewed-by: Ryan Sleevi <sleevi@google.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2020-06-02 19:58:42 +00:00
Dan Scales
e05695ed4d runtime: add three new partial orders for lock ranking
Two are associated with the new sysmon rank:  lockRankSysmon -> lockRankFin
(https://build.golang.org/log/07b0b8ee6ec9421d83699a1d850d9938390fb996)
and one I encountered during testing, lockRankSysmon -> lockRankWbufSpans

And another just seems not to have occurred before:  lockRankScavenge -> lockRankFin
(https://build.golang.org/log/07ba499b861fc93f527ef8514f5ba4c77086f4c4)

Change-Id: I070b5ed8e742857e815c6a56f8439d17a0ba36f3
Reviewed-on: https://go-review.googlesource.com/c/go/+/236137
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2020-06-02 18:36:30 +00:00