Commit graph

60258 commits

Author SHA1 Message Date
Gopher Robot d2909ec885 api: promote next to go1.23
Change-Id: I219c59b5efc2ed7fcfdd7cd3c418635831b17b8a
Reviewed-on: https://go-review.googlesource.com/c/go/+/590835
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2024-06-05 20:48:49 +00:00
Dmitri Shuralyov e53d10dc04 doc: mark range-over-func as documented
The language change for the accepted range-over-func proposal #61405
was documented in CL 590616. Remove the corresponding 'TODO' entry.

Also improve formatting slightly, and switch to preferred relative
links. They'll work better in the long term and in more contexts.

While here, also simplify the suggested line to preview release notes
locally: setting the -content='' flag explicitly is no longer required
as of CL 589936.

For #65614.

Change-Id: I6cee951b9ede33900bca48c9f709e3b2c5e87337
Reviewed-on: https://go-review.googlesource.com/c/go/+/590756
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
2024-06-05 19:56:43 +00:00
Damien Neil b658265012 net/http: use default HTTP/2 frame scheduler
Use the default frame scheduler (currently round-robin)
rather than overriding the default with the priority scheduler.

The priority scheduler is slow, known buggy, and implements
a deprecated stream prioritization mechanism. The default
changed in x/net about a year ago, but we missed that net/http
is overriding that default.

Fixes #67706

Change-Id: I6d76dd0cc8c55eb5dec5cd7d25a5084877e8e8d9
Reviewed-on: https://go-review.googlesource.com/c/go/+/590796
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
2024-06-05 19:28:07 +00:00
Ian Lance Taylor 93bbf719a6 doc/next: mention new error on time.Parse timezone overflow
For #65614
For #67470

Change-Id: Iba2f263f8ca1fb10c383e12ff3455aa86b26421d
Reviewed-on: https://go-review.googlesource.com/c/go/+/590795
Commit-Queue: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2024-06-05 17:30:16 +00:00
Robert Griesemer f3ae135604 doc: document GOEXPERIMENT=aliastypeparams in release notes
For #65614.

Change-Id: I05b20a80b1163e1d3927c2f763ef6b7d20e6a937
Reviewed-on: https://go-review.googlesource.com/c/go/+/590617
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2024-06-05 15:56:51 +00:00
limeidan 7a072fc250 cmd/link/internal/loong64: correct the musl dynamic linker path
The arch name of loong64 should be loongarch64

Fixes #67832

Change-Id: Ic5cf0f0274262a164bba78c426813a8b8851033b
Reviewed-on: https://go-review.googlesource.com/c/go/+/590695
Reviewed-by: Than McIntosh <thanm@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: abner chenc <chenguoqi@loongson.cn>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
2024-06-05 13:49:14 +00:00
Robert Griesemer 1b07b774c0 doc: document "range-over-func" language change in release notes
For #65614.

Change-Id: Idbbcb6eb57b7294d52b174c1aba74ca7aa1b8efd
Reviewed-on: https://go-review.googlesource.com/c/go/+/590616
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
2024-06-04 23:33:52 +00:00
Ian Lance Taylor 103317217d os/signal: clarify that non-Go thread may change signal mask
Fixes #67773

Change-Id: I05c9934a5b2719d22884c8546f4fadaa9978ac67
Reviewed-on: https://go-review.googlesource.com/c/go/+/589755
Auto-Submit: Ian Lance Taylor <iant@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2024-06-04 22:16:01 +00:00
Robert Griesemer 1724c26142 spec: better examples for range-over-func
For #65237.

Change-Id: Id38747efebd46633f453eadaf68d818064faa778
Reviewed-on: https://go-review.googlesource.com/c/go/+/590396
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
2024-06-04 21:07:21 +00:00
Mateusz Poliwczak e8f7a959ec crypto/x509: don't panic when asn1.ObjectIdentifier is shorter than x509.OID
Change-Id: Ia08673450edc93fe1a9c7c05b7e69a05cd5ac8b9
GitHub-Last-Rev: c396197cb1
GitHub-Pull-Request: golang/go#64655
Reviewed-on: https://go-review.googlesource.com/c/go/+/548915
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
2024-06-04 19:10:38 +00:00
Roland Shoemaker ad4d9b0464 net/netip: check if address is v6 mapped in Is methods
In all of the Is* methods, check if the address is a v6 mapped v4
address, and unmap it if so.

Thanks to Enze Wang of Alioth (@zer0yu) and Jianjun Chen of Zhongguancun
Lab (@chenjj) for reporting this issue.

Fixes #67680
Fixes CVE-2024-24790

Change-Id: I6bd03ca1a5d93a0b59027d861c84060967b265b0
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/1460
Reviewed-by: Russ Cox <rsc@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/590316
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-06-04 17:10:01 +00:00
David du Colombier e240d8150c net: handle more error strings in lookupCNAME on Plan 9
On Plan 9, the queryDNS function could return an
error string, which was not handled in lookupCNAME.

This change fixes lookupCNAME by handling the
"resource does not exist; negrcode" error string.

Fixes #67776.

Change-Id: I73f3286b9524a504212ba4303606a245b4962b1f
Reviewed-on: https://go-review.googlesource.com/c/go/+/589715
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: David du Colombier <0intro@gmail.com>
TryBot-Bypass: David du Colombier <0intro@gmail.com>
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2024-06-04 17:08:38 +00:00
Roland Shoemaker b91f054a64 crypto/tls: fix test caching for bogo
Use a stat to tell the test caching infrastructure that we care about
the bogo config file.

Change-Id: Iae2336bfc45cd6a9e73cb83a3b68ade8b4f23927
Reviewed-on: https://go-review.googlesource.com/c/go/+/589155
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Roland Shoemaker <roland@golang.org>
2024-06-04 16:56:43 +00:00
Michael Anthony Knyszek b5a8617823 all: update vendored dependencies
The Go 1.23 code freeze has recently started. This is a time to update
all golang.org/x/... module versions that contribute packages to the
std and cmd modules in the standard library to latest master versions.

For #36905.

[git-generate]
go install golang.org/x/build/cmd/updatestd@latest
go install golang.org/x/tools/cmd/bundle@latest
updatestd -goroot=$(pwd) -branch=master

Change-Id: I9162f547c148809d6fb1e4157f6f504634cef3b7
Reviewed-on: https://go-review.googlesource.com/c/go/+/589935
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-06-04 16:19:04 +00:00
Roland Shoemaker 499de42188 crypto/tls: better bogo test output handling
Use the bogo JSON output format to make the test output more readable.

Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest
Change-Id: Ie1a67c6a031bc1d5d8b2cdfaf78d094a0967bc2a
Reviewed-on: https://go-review.googlesource.com/c/go/+/587955
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-06-04 15:52:42 +00:00
Robert Griesemer 535f81e74e spec: document for range loop over functions
For #61405.
Fixes #65237.

Change-Id: Ia7820c0ef089c828ea7ed3d2802c5185c945290e
Reviewed-on: https://go-review.googlesource.com/c/go/+/589397
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2024-06-04 15:28:33 +00:00
Michael Matloob 200b2809f6 cmd/vendor: pull in golang.org/x/telemetry@4691165
Commands run:
    go get golang.org/x/telemetry@4691165
    go mod vendor
    go mod tidy

Change-Id: Icc72e77bab5e9687fbef74ada812708180725869
Reviewed-on: https://go-review.googlesource.com/c/go/+/590076
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
2024-06-04 14:52:56 +00:00
hxzhouh eaa7d9ff86 time: time/internal_test.go remove redundant type conversion
Change-Id: I5aaea4918f024a87146ba54a8d5307658d722fe9
Reviewed-on: https://go-review.googlesource.com/c/go/+/589635
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: hui zhou <hxzhouh@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2024-06-03 14:56:37 +00:00
cuishuang 71751350b0 all: make function comments match function names
Change-Id: Ideb9ef00e7bc660b005fc080973fd9f3d36c5a1f
Reviewed-on: https://go-review.googlesource.com/c/go/+/589536
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: shuang cui <imcusg@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-06-03 14:56:25 +00:00
Emmanuel T Odeke 9b43bfbc51 cmd/vendor: update github.com/google/pprof
Brings in the latest github.com/google/pprof.

Fixes #67626

Change-Id: Id8faef20f0a9bf81dd117110bf540aca852db6be
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/588655
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2024-05-31 19:48:28 +00:00
Tobias Klauser 00b8071a12 net/netip: cover IPv4Unspecified in TestAddrWellKnown
Like IPv6Unspecified which is already covered in that test.

Change-Id: I2bac4c50577c4c2c91cea26b9fbed88327cef516
Reviewed-on: https://go-review.googlesource.com/c/go/+/589595
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
2024-05-31 19:15:10 +00:00
Ian Lance Taylor 639cc0dcc0 runtime: remove zhangyunhao116/fastrand from cheaprand linkname comment
As of version 0.5.0 and Go 1.22 it no longer linknames cheaprand.

Fixes #67709

Change-Id: Ie00900e6428244fa1506bc509c265c10dc322f7a
Reviewed-on: https://go-review.googlesource.com/c/go/+/589555
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-31 14:32:47 +00:00
Daman Arora 5bf8c0cf09 internal/poll: update WaitWrite comment
Change-Id: Id2999d95f344b3e30d98682aac5da630d808ce2d
GitHub-Last-Rev: 69c207f51c
GitHub-Pull-Request: golang/go#67732
Reviewed-on: https://go-review.googlesource.com/c/go/+/589396
Auto-Submit: Ian Lance Taylor <iant@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
2024-05-31 04:09:44 +00:00
Michael Anthony Knyszek 09e5bab8c1 cmd/cgo/internal/testsanitizers: make the libfuzzer tests all short
CL 589295 only made one of the two tests short, because the other one
seemed to be passing consistently in short mode. On the builders, it
seems to still fail maybe 30% of the time by taking too long. Disable
these tests in short mode.

For #67698.

Change-Id: I9fd047f834f7493b608dd1fee5b9b6dfabbea03d
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-clang15,gotip-linux-386-clang15
Reviewed-on: https://go-review.googlesource.com/c/go/+/589495
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Michael Knyszek <mknyszek@google.com>
2024-05-31 00:12:03 +00:00
Michael Pratt 1ed8166192 internal/trace: actually add experimental data to map
addExperimentalData was missing actually placing the data into the map,
leaving ExperimentalEvent.Data always nil.

Change-Id: I1715ab11eb7cfcdb982b56be28378521a357ca2d
Reviewed-on: https://go-review.googlesource.com/c/go/+/588955
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-30 22:14:45 +00:00
Carlos Amedee 44d06616b5 doc/next: preannounce a new Linux kernel version requirement
This change adds a preannouncement to the release notes. Go 1.24
will require the Linux kernel to be at version 3.17 or later,
with an exception that systems running 3.10 or later will
continue to be supported if the kernel has been patched to
support the getrandom system call.

For #65614
For #67001

Change-Id: I61a3838b9ce4f48eb9f94830aa03372d589afdcd
Reviewed-on: https://go-review.googlesource.com/c/go/+/589015
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2024-05-30 19:26:10 +00:00
Robert Griesemer cc95d85fe4 cmd/compile: remove quoting in favor of clearer prose in error messages
In an attempt to address issue #65790 (confusing error messages),
quoting of names was introduced for some (but not all) names used
in error messages.

That CL solved the issue at hand at the cost of extra punctuation
(the quotes) plus some inconsistency (not all names were quoted).

This CL removes the quoting again in favor or adding a qualifying noun
(such as "name", "label", "package", "built-in" etc.) before a user-
specified name where needed.

For instance, instead of

        invalid argument to `max'

we now say

        invalid argument to built-in max

There's still a chance for confusion. For instance, before an error
might have been

        `sadly' not exported by package X

and now it would be

        name sadly not exported by package X

but adverbs (such as "sadly") seem unlikely names in programs.

This change touches a lot of files but only affects error messages.

Fixes #67685.

Change-Id: I95435b388f92cade316e2844d59ecf6953b178bc
Reviewed-on: https://go-review.googlesource.com/c/go/+/589118
Auto-Submit: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
2024-05-30 19:19:55 +00:00
Robert Griesemer f1039180bd cmd/compile/internal/types2: enable Alias types for TestStdlib
This is expected to eliminate a potential race condition
which is causing a flaky test.

Fixes #67260.

Change-Id: I3fd76047136e2d4659a1c551491e371b67e8a7ce
Reviewed-on: https://go-review.googlesource.com/c/go/+/589236
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-30 19:18:33 +00:00
Dmitri Shuralyov c8cb31a36e doc/next: document proposal 62518 as not relevant
For #65614.

Change-Id: I03dc3a46052f1e55dc1ab46b45c886c96c4a1b39
Reviewed-on: https://go-review.googlesource.com/c/go/+/589216
TryBot-Bypass: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2024-05-30 18:01:58 +00:00
Rhys Hiltner 9114c51521 Revert "runtime: prepare for extensions to waiting M list"
This reverts commit be0b569caa (CL 585635).

Reason for revert: This is part of a patch series that changed the
handling of contended lock2/unlock2 calls, reducing the maximum
throughput of contended runtime.mutex values, and causing a performance
regression on applications where that is (or became) the bottleneck.

Updates #66999
Updates #67585

Change-Id: I7843ccaecbd273b7ceacfa0f420dd993b4b15a0a
Reviewed-on: https://go-review.googlesource.com/c/go/+/589117
Auto-Submit: Rhys Hiltner <rhys.hiltner@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
2024-05-30 17:57:37 +00:00
Rhys Hiltner 3f4be127bc Revert "runtime: use semaphore structure for futex locks"
This reverts commit dfb7073bb8 (CL 585636).

Reason for revert: This is part of a patch series that changed the
handling of contended lock2/unlock2 calls, reducing the maximum
throughput of contended runtime.mutex values, and causing a performance
regression on applications where that is (or became) the bottleneck.

Updates #66999
Updates #67585

Change-Id: I3483bf0b85ba0b77204032a68b7cbe93f142703e
Reviewed-on: https://go-review.googlesource.com/c/go/+/589098
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Rhys Hiltner <rhys.hiltner@gmail.com>
2024-05-30 17:57:34 +00:00
Rhys Hiltner afbbc2894b Revert "runtime: double-link list of waiting Ms"
This reverts commit d881ed6384 (CL 585637).

Reason for revert: This is part of a patch series that changed the
handling of contended lock2/unlock2 calls, reducing the maximum
throughput of contended runtime.mutex values, and causing a performance
regression on applications where that is (or became) the bottleneck.

Updates #66999
Updates #67585

Change-Id: I70d8d0b74f73be95c43d664f584e8d98519aba26
Reviewed-on: https://go-review.googlesource.com/c/go/+/589116
Auto-Submit: Rhys Hiltner <rhys.hiltner@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
2024-05-30 17:56:46 +00:00
Rhys Hiltner 5dead59add Revert "runtime: profile mutex contention during unlock"
This reverts commit ba1c5b2c45 (CL 585638).

Reason for revert: This is part of a patch series that changed the
handling of contended lock2/unlock2 calls, reducing the maximum
throughput of contended runtime.mutex values, and causing a performance
regression on applications where that is (or became) the bottleneck.

Updates #66999
Updates #67585

Change-Id: Ibeec5d8deb17e87966cf352fefc7efe2267839d6
Reviewed-on: https://go-review.googlesource.com/c/go/+/589115
Auto-Submit: Rhys Hiltner <rhys.hiltner@gmail.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-30 17:56:43 +00:00
Rhys Hiltner ca7d300509 Revert "runtime: remove GODEBUG=runtimecontentionstacks"
This reverts commit 87e930f728 (CL 585639)

Reason for revert: This is part of a patch series that changed the
handling of contended lock2/unlock2 calls, reducing the maximum
throughput of contended runtime.mutex values, and causing a performance
regression on applications where that is (or became) the bottleneck.

Updates #66999
Updates #67585

Change-Id: I1e286d2a16d16e4af202cd5dc04b2d9c4ee71b32
Reviewed-on: https://go-review.googlesource.com/c/go/+/589097
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Rhys Hiltner <rhys.hiltner@gmail.com>
2024-05-30 17:52:17 +00:00
Rhys Hiltner e6b8b2f3e2 Revert "runtime: improve runtime-internal mutex profile tests"
This reverts commit f9ba2cff22 (CL 586237)

Reason for revert: This is part of a patch series that changed the
handling of contended lock2/unlock2 calls, reducing the maximum
throughput of contended runtime.mutex values, and causing a performance
regression on applications where that is (or became) the bottleneck.

This test verifies that the semantics of the mutex profile for
runtime.mutex values matches that of sync.Mutex values. Without the rest
of the patch series, this test would correctly identify that Go 1.22's
semantics are incorrect (issue #66999).

Updates #66999
Updates #67585

Change-Id: Id06ae01d7bc91c94054c80d273e6530cb2d59d10
Reviewed-on: https://go-review.googlesource.com/c/go/+/589096
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Auto-Submit: Rhys Hiltner <rhys.hiltner@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-30 17:50:53 +00:00
Rhys Hiltner 1be701a344 Revert "runtime: split mutex profile clocks"
This reverts commit 8ab131fb12 (CL 586796)

Reason for revert: This is part of a patch series that changed the
handling of contended lock2/unlock2 calls, reducing the maximum
throughput of contended runtime.mutex values, and causing a performance
regression on applications where that is (or became) the bottleneck.

Updates #66999
Updates #67585

Change-Id: I54711691e86e072081482102019d168292b5150a
Reviewed-on: https://go-review.googlesource.com/c/go/+/589095
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Rhys Hiltner <rhys.hiltner@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2024-05-30 17:49:07 +00:00
Sam Thanawalla e6504ce671 cmd/go: add compatibility tests for go mod tidy -diff
For #27005
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest
Change-Id: I90ab8c21222ac2189abb40e8c8e7549e2d940dd2
Reviewed-on: https://go-review.googlesource.com/c/go/+/587941
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2024-05-30 14:56:56 +00:00
Michael Anthony Knyszek 81d424ee9a internal/trace: fix off-by-one error in arguments for exp events
There's an off-by-one error in computing the Args field for experimental
events, resulting in confusing output. This wasn't caught because no
test actually checks to make sure the experimental arguments make sense
yet.

Change-Id: I339677a80bee6319407fced20d5e0f9c2fd235b3
Reviewed-on: https://go-review.googlesource.com/c/go/+/589055
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
2024-05-30 12:39:00 +00:00
Michael Anthony Knyszek 787414ca48 cmd/cgo/internal/swig: force use of lld for LTO tests on the builders
For whatever reason, on the builders, when using /usr/bin/ld (the
default linker) with -flto we end up with problems. Specifically, the
linker seems to require LLVMgold.so and can't find it. I'm not really
sure why, but what definitely seems to work is forcing use of lld, which
ships with our clang installation on the builders.

Just enforce this on the builders for now; I've actually had very few
problems running this locally (and I think I'm also mixing and matching
linkers and toolchains too...), so it may be related to the version of
clang we're testing with.

This change, along with CL 589295, should fully fix the clang builders.

Fixes #67698.

Change-Id: I3bfbcd609e7d0fd70e52ac7e2a0817db95664f20
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-clang15,gotip-linux-386-clang15
Reviewed-on: https://go-review.googlesource.com/c/go/+/589296
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2024-05-30 12:38:14 +00:00
Michael Anthony Knyszek 1cf862e66c cmd/cgo/internal/testsanitizers: skip some libfuzzer tests in short mode
These tests are newly-running now that we have installed a C++ toolchain
on the clang builders, but one of them doesn't actually complete in short
mode.

For #67698.

Change-Id: Id1ff4c05e380426d920277c13495f30e23561a4e
Reviewed-on: https://go-review.googlesource.com/c/go/+/589295
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2024-05-30 12:32:05 +00:00
Michael Anthony Knyszek cad3ed207f cmd/cgo/internal/swig,cmd/go: reenable swig tests on 386
CL 588938 skipped the tests because they were broken to unblock the
builders, but we're fairly certain the reason they were failing is
because we're missing g++-multilib. This change is intended to land once
CL 589175 is deployed.

Fixes #67698.

Change-Id: I5bb679290ae9ba9ab3bda9499cdf1eec649bc066
Reviewed-on: https://go-review.googlesource.com/c/go/+/589195
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2024-05-30 04:04:13 +00:00
Michael Anthony Knyszek fa08befb25 cmd/cgo/internal/swig,cmd/go: skip swig tests on 386
We recently added a C++ toolchain to the image, and this is causing
problems on 386 and clang builders. The likely culprit is that we're
missing 32-bit C++ libraries on the builders.

Even if this theory is wrong, these tests *never* ran (always skipped,
or truly never ran) on these platforms, so just skip them for now. We
can look into getting the libraries installed later, but skip for now
to unblock the builders.

There are also problems with clang, but I believe they'll be resolved by
setting CXX to clang++ in golangbuild.

For #67698.

Change-Id: I20fc1c5fa1285001ff86a4226771c30cf2e7f92d
Cq-Include-Trybots: luci.golang.try:gotip-linux-386-clang15,gotip-linux-386
Reviewed-on: https://go-review.googlesource.com/c/go/+/588938
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-29 19:59:15 +00:00
Russ Cox 2a7ca156b8 all: document legacy //go:linkname for final round of modules
Add linknames for most modules with ≥50 dependents.
Add linknames for a few other modules that we know
are important but are below 50.

Remove linknames from badlinkname.go that do not merit
inclusion (very small number of dependents).
We can add them back later if the need arises.

Fixes #67401. (For now.)

Change-Id: I1e49fec0292265256044d64b1841d366c4106002
Reviewed-on: https://go-review.googlesource.com/c/go/+/587756
Auto-Submit: Russ Cox <rsc@golang.org>
TryBot-Bypass: Russ Cox <rsc@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2024-05-29 17:58:53 +00:00
Russ Cox 5121b45d74 crypto/tls: add linkname comments dropped from CL 587220
A bad merge syncing before the submit of CL 587220 dropped these.
(I forgot to write the file out.)

For #67401.

Change-Id: I6f2ba69f388907f3d24eeef55c80cbb2cf51f580
Reviewed-on: https://go-review.googlesource.com/c/go/+/587755
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Marten Seemann <martenseemann@gmail.com>
2024-05-29 16:25:28 +00:00
Russ Cox 9a8995b8b6 all: document legacy //go:linkname for modules with ≥100 dependents
For #67401.

Change-Id: I015408a3f437c1733d97160ef2fb5da6d4efcc5c
Reviewed-on: https://go-review.googlesource.com/c/go/+/587598
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Russ Cox <rsc@golang.org>
2024-05-29 16:25:21 +00:00
Kir Kolyshkin a3a584e4ab os: RemoveAll: fix symlink race for unix
Since all the platforms now support O_DIRECTORY flag for open, it can be
used to (together with O_NOFOLLOW) to ensure we open a directory, thus
eliminating the need to call stat before open. This fixes the symlink race,
when a directory is replaced by a symlink in between stat and open calls.

While at it, rename openFdAt to openDirAt, because this function is (and was)
meant for directories only.

NOTE Solaris supports O_DIRECTORY since before Solaris 11 (which is the
only version Go supports since supported version now), and Illumos
always had it. The only missing piece was O_DIRECTORY flag value, which
is taken from golang.org/x/sys/unix.

Updates #52745.

Change-Id: Ic1111d688eebc8804a87d39d3261c2a6eb33f176
Reviewed-on: https://go-review.googlesource.com/c/go/+/588495
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Aleksa Sarai <cyphar@cyphar.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2024-05-29 13:52:34 +00:00
Mauri de Souza Meneguzzo 3dcb9623df syscall: add Setuid for aix
Fixes #67651

Change-Id: I8128433ddd040c8b91d7b6264200e19433d7a7dc
GitHub-Last-Rev: 7557a88cf5
GitHub-Pull-Request: golang/go#67656
Reviewed-on: https://go-review.googlesource.com/c/go/+/588119
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Run-TryBot: Mauri de Souza Meneguzzo <mauri870@gmail.com>
TryBot-Bypass: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-05-29 13:50:55 +00:00
Mateusz Poliwczak 78eadc87df make.bash: preserve GOROOT_BOOTSTRAP
CL 582076 made the GOROOT_BOOTSTRAP set to "", which in turn
causes the next iteration to return true. "$GOROOT_BOOTSTRAP/bin/go"
becomes "/bin/go", which always exists.

Fixes #67654

Change-Id: I290bd4a7defc58e4b34d5bf955ef4f34569ff0ed
GitHub-Last-Rev: 9c7134fa44
GitHub-Pull-Request: golang/go#67655
Reviewed-on: https://go-review.googlesource.com/c/go/+/588436
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-05-29 13:48:46 +00:00
Robert Griesemer 13c49096fd go/types, types2: report error when using uninstantiated signature alias
For #67547.
Fixes #67683.

Change-Id: I9487820ab4e2bd257d253a7016df45729b29f836
Reviewed-on: https://go-review.googlesource.com/c/go/+/588855
Auto-Submit: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
2024-05-29 02:09:54 +00:00
Robert Griesemer ee29dbe43e go/types, types2: don't lose alias information during unification
While at it, rename asTypeParam to asBoundTypeParam for clarity.

For #67547.
Fixes #67628.

Change-Id: I2f447c4cd4d72f5315fe9323d82fcb9bf33657c6
Reviewed-on: https://go-review.googlesource.com/c/go/+/588797
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2024-05-29 02:09:51 +00:00