Commit graph

60336 commits

Author SHA1 Message Date
Cherry Mui 5d759ac902 doc/next: reword linker -bindnow release notes
For #65614.

Change-Id: I1a2a4bc18601526053840a280e0604a8e1028ce6
Reviewed-on: https://go-review.googlesource.com/c/go/+/591899
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2024-06-11 16:47:18 +00:00
Robert Griesemer 0d478d8e07 go/types, types2: add missing Unalias calls in type unifier
The unification code has "early exits" when the compared
types are pointer-identical.

Because of Alias nodes, we cannot simply compare x == y but we
must compare Unalias(x) == Unalias(y). Still, in the common case
there are no aliases, so as a minor optimization we write:

        x == y || Unalias(x) == Unalias(y)

to test whether x and y are (pointer-) identical.
Add the missing Unalias calls in the place where we forgot them.

Fixes #67872.

Change-Id: Ia26ffe7205b0417fc698287a4aeb1c900d30cc0d
Reviewed-on: https://go-review.googlesource.com/c/go/+/591975
Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Griesemer <gri@google.com>
2024-06-11 16:24:39 +00:00
Michael Pratt beaf7f3282 os: overhaul handling of PID vs pidfd within Process
There are several issues with pidfd handling today:

* The zero value of a Process makes the handle field appear valid, so
  methods attempt to use it as a pidfd rather than falling back to the
  PID as they should (#67634).

* If a process doesn't exist, FindProcess returns a Process with Pid ==
  -2, which is not a compatible change (#67640).

* pidfd close is racy as-is. A Release call or successful Wait will
  clear the handle field and close the pidfd. However, a concurrent call
  may have already loaded the handle field and could then proceed to use
  the closed FD (which could have been reopened as a different pidfd,
  targeting a different process) (#67641).

This CL performs multiple structural changes to the internals of
Process.

First and foremost, each method is refactored to clearly select either
pidfd or raw pid mode. Previously, raw pid mode was structured as a
fallback when pidfd mode is unavailable. This works fine, but it does
not make it clear that a given Process object either always uses pidfd
or always uses raw pid. Since each mode needs to handle different race
conditions, it helps to make it clear that we can't switch between modes
within a single Process object.

Second, pidfd close safety is handled by reference counting uses of the
FD. The last user of the FD will close the FD. For example, this means
that with concurrent Release and Signal, the Signal call may be the one
to close the FD. This is the bulk of this CL, though I find the end
result makes the overall implementation easier to reason about.

Third, the PID path handles a similar race condtion between Wait and
Kill: Wait frees the PID value in the kernel, which could be reallocated
causing Kill to target the wrong process. This is handled with a done
flag and a mutex. The done flag now shares the same state field used for
the handle.

Similarly, the Windows implementation reuses all of the handle reference
counting that Linux uses. This means the implementations more
consistent, and make Windows safe against the same handle reuse
problems. (Though I am unsure if Windows ever reuses handles).

Wait has a slight behavior change on Windows: previously Wait after
Release or an earlier Wait would hang indefinitely (WaitForSingleObject
on syscall.InvalidHandle waits indefinitely). Now it returns the same
errors as Linux (EINVAL and ErrProcessDone, respectively).

Similarly, Release on Windows no longer returns close errors, as it may
not actually be the place where the close occurs.

Fixes #67634.
Fixes #67640.
Fixes #67641.
Updates #67642.

Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest
Change-Id: I2ad998f7b67d32031e6f870e8533dbd55d3c3d10
Reviewed-on: https://go-review.googlesource.com/c/go/+/588675
Reviewed-by: Austin Clements <austin@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-06-10 22:06:47 +00:00
Than McIntosh a130fb6309 cmd/compile/internal/ssa: fix DWARF location expr for .closureptr
CL 586975 added support to the compiler back end to emit a synthetic
".closureptr" variable in range func bodies, plus code to spill the
incoming context pointer to that variable's location on the stack.

This patch fixes up the code in the back end that generates DWARF
location lists for incoming parameters (which sometimes arrive in
registers) in the "-l -N" no-optimization case to also create a
correct DWARF location list for ".closureptr", a two-piece list
reflecting the fact that its value arrives in a register and then is
spilled to the stack in the prolog.

Fixes #67918.

Change-Id: I029305b5248b8140253fdeb6821b877916fbb87a
Reviewed-on: https://go-review.googlesource.com/c/go/+/591595
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alessandro Arzilli <alessandro.arzilli@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2024-06-10 19:44:43 +00:00
Robert Griesemer 4256ec1661 cmd/compile/internal/syntax: return correct start pos for KeyValueExprs
Fixes #67866.

Change-Id: Id9d345aab87e493b8ed94319c5acaa1900362648
Reviewed-on: https://go-review.googlesource.com/c/go/+/591695
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-06-10 17:49:19 +00:00
Andrew W. Phillips f515c1bac7 cmd/go/internal/work: avoid panic for a repeated //go:debug setting
The creation of a bytes.Buffer in one code path is missing causing a nil
pointer dereference.

Changed (as rec. by Bryan Mills) to use fmt.Appendf() on []byte instead of
fmt.Fprintf on *bytes.Buffer - simpler and avoids duplicated code (but
requires Go 1.19 or later).

Added test to verify the change (as rec. by Michael Matloob) at
src\cmd\go\testdata\script\build_repeated_godebug_issue62346.txt

Fixes #62346

Change-Id: Ic3267d878a6f7ebedb1cde64e6206de404176b10
Reviewed-on: https://go-review.googlesource.com/c/go/+/523836
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Michael Matloob <matloob@golang.org>
2024-06-10 14:46:37 +00:00
Jes Cok da65071f36 cmd/compile/internal/types2: fix typo in comment for StoreTypesInSyntax
Change-Id: Ia73b15b6df5e6f88741f2b54258d7cbad0239ddd
Reviewed-on: https://go-review.googlesource.com/c/go/+/591396
Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-06-10 13:48:53 +00:00
Rodrigo Orselli c83b1a7013 sync: include links to the Go memory model in package documentation
The lack of links to https://go.dev/ref/mem in the sync package
documentation makes it difficult to read for people who have no previous
knowledge of that page.  This PR includes the links where needed.

Fixes #67891

Change-Id: I0e1344cc6d7b702f4cb2e55fe0fcee3eb089391a
GitHub-Last-Rev: 427cf58aae
GitHub-Pull-Request: golang/go#67892
Reviewed-on: https://go-review.googlesource.com/c/go/+/591395
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: 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>
2024-06-07 21:14:51 +00:00
Kir Kolyshkin 532cf27059 syscall: rm go:linkname from origRlimitNofile
Since CL 588076 runc can do fine without the kludge. The code accessing the symbol is now guarded with `go:build !go1.23` in all supported runc branches (main: [1], release-1.1: [2]).

This reverts part of CL 587219.

Updates #67401.

For #66797.

[1]: https://github.com/opencontainers/runc/pull/4290
[2]: https://github.com/opencontainers/runc/pull/4299

Change-Id: I204843a93c36857e21ab9b43bd7aaf046e8b9787
Reviewed-on: https://go-review.googlesource.com/c/go/+/587918
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-06-07 20:13:57 +00:00
qiulaidongfeng 5532427c4b os/exec: on Windows look for extensions in Run if not already done
CL 512155 fixed #36768, but introduced #62596.
CL 527820 fixed #62596, but meant that the code failed to look up
file extensions on Windows for a relative path.
This CL fixes that problem by recording whether it has already
looked up file extensions.
This does mean that if Path is set manually then we do not update
it with file extensions, as doing that would be racy.

Fixes #66586

Change-Id: I9a0305d1e466c5e07bfbe442566ea12f5255a96e
GitHub-Last-Rev: dc3169f235
GitHub-Pull-Request: golang/go#67035
Reviewed-on: https://go-review.googlesource.com/c/go/+/581695
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-06-07 20:13:53 +00:00
Michael Anthony Knyszek 1634fde4f9 iter: don't iterate if stop is called before next on Pull
Consider the following code snippet:

    next, stop := iter.Pull(seq)
    stop()

Today, seq will iterate exactly once before it notices that its
iteration is invalid to begin with. This effect is observable in a
variety of ways. For example, if the iterator panics, since that panic
must propagate to the caller of stop. But if the iterator is stateful in
anyway, then it may update some state.

This is somewhat unexpected and because it's observable, can be depended
upon. This behavior does not align well with other possible
implementations of Pull, like CPS performed by the compiler. It's also
just odd to let even one iteration happen, precisely because of
unexpected state modification.

Fix this by not iterating at all of the done flag is set before entering
the iterator.

For #67712.

Change-Id: I18162e29df45a2e8968f68379450d92e1de47c4d
Reviewed-on: https://go-review.googlesource.com/c/go/+/590075
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Austin Clements <austin@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-06-07 19:09:28 +00:00
Michael Anthony Knyszek 9d2aeae72d iter: propagate runtime.Goexit from iterator passed to Pull
This change propagates a runtime.Goexit initiated by the iterator into
the caller of next and/or stop.

Fixes #67712.

Change-Id: I5bb8d22f749fce39ce4f587148c5fc71aee2af65
Reviewed-on: https://go-review.googlesource.com/c/go/+/589137
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: David Chase <drchase@google.com>
2024-06-07 19:09:18 +00:00
Michael Anthony Knyszek 1471978bac iter: propagate panics from the iterator passed to Pull
This change propagates panics from the iterator passed to Pull through
next and stop. Once the panic occurs, next and stop become no-ops (the
iterator is invalidated).

For #67712.

Change-Id: I05e45601d4d10acdf51b53e3164bd891c1b324ac
Reviewed-on: https://go-review.googlesource.com/c/go/+/589136
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Austin Clements <austin@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-06-07 19:09:09 +00:00
Paul E. Murphy d5e5b14305 cmd/compile/ssa: fix (MOVWZreg (RLWINM)) folding on PPC64
RLIWNM does not clear the upper 32 bits of the target register if
the mask wraps around (e.g 0xF000000F). Don't elide MOVWZreg for
such masks. All other usage clears the upper 32 bits.

Fixes #67844.

Change-Id: I11b89f1da9ae077624369bfe2bf25e9b7c9b79bc
Reviewed-on: https://go-review.googlesource.com/c/go/+/590896
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-06-07 19:02:52 +00:00
qiulaidongfeng e709992afd cmd/go: avoid when go.env contain GOTOOLCHAIN=local test fail
The test fail when $GOROOT/go.env contain GOTOOLCHAIN=local
because GOTOOLCHAIN=local is assumed to be a non-default value.
This CL fixed the test failure
by using go.env from the test as $GOROOT/go.env throughout the test.
Test have also been added to ensure that
when $GOROOT/go.env contain GOTOOLCHAIN=local,
GOTOOLCHAIN=local is not taken as a non-default value.

Fixes #67793

Change-Id: Ibc5057d38d36c6c55726a039de1e7c37d6935b52
GitHub-Last-Rev: 12b62464e6
GitHub-Pull-Request: golang/go#67807
Reviewed-on: https://go-review.googlesource.com/c/go/+/590196
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-06-07 18:49:03 +00:00
Ian Lance Taylor fbe478521f cmd/go: add pointer to build flags in "go get" docs
Fixes #67728

Change-Id: Ifbdee77dcebd865eac9501ec4615128eb3a9c9c0
Reviewed-on: https://go-review.googlesource.com/c/go/+/590797
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Commit-Queue: Ian Lance Taylor <iant@google.com>
2024-06-07 18:26:32 +00:00
Ian Lance Taylor ce51533a9d os/signal: remove SIGSYS from list of signals that take no action
It actually causes the program to throw.

Fixes #67729

Change-Id: Id970baff631616a4dc4e434827e622e1b16f2724
Reviewed-on: https://go-review.googlesource.com/c/go/+/590915
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-06-07 18:11:00 +00:00
Chance Zibolski 640067f28a net/http: check GetConfigForClient in server.ServeTLS
Just like for tls.Config.GetCertificate the http.Server.ServeTLS method
should be checking tls.Config.GetConfigForClient before trying top open
the specified certFile/keyFile.

This was previously fixed for crypto/tls when using tls.Listen in
CL205059, but the same change for net/http was missed. I've added a
comment src/crypto/tls/tls.go in the relevant section in the hope that
any future changes of a similar nature consider will consider updating
net/http as needed as well.

Change-Id: I312303bc497d92aa2f4627fe2620c70779cbcc99
GitHub-Last-Rev: 6ed29a9008
GitHub-Pull-Request: golang/go#66795
Reviewed-on: https://go-review.googlesource.com/c/go/+/578396
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2024-06-07 17:57:01 +00:00
Cherry Mui 0b72631a82 cmd/compile: generate args_stackmap for ABI0 assembly func regardless of linkname
Currently, the compiler generates the argument stack map based on
the function signature for bodyless function declarations, if it
is not linknamed. The assumption is that linknamed function is
provided by (Go code in) another package, so its args stack map
will be generated when compiling that package.

Now we have linknames added to declarations of assembly functions,
to signal that this function is accessed externally. Examples
include runtime.morestack_noctxt, math/big.addVV. In the current
implementation the compiler does not generate its args stack map.
That causes the assembly function's args stack map missing.
Instead, change it to generate the stack map if it is a
declaration of an ABI0 function, which can only be defined in
assembly and passed to the compiler through the -symabis flag. The
stack map generation currently only works with ABI0 layout anyway,
so we don't need to handle ABIInternal assembly functions.

Change-Id: Ic9da3b4854c604e64ed01584da3865994f5b95b8
Reviewed-on: https://go-review.googlesource.com/c/go/+/587928
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2024-06-07 15:22:22 +00:00
Cherry Mui 98529a8e7c cmd/link: don't include deadcoded function symbols in shared build mode
In shared build mode, we include all symbols. This includes
function symbols that are deadcoded by the compiler. They don't
really get compiled, and their metadata may be missing, causing
linker failures. Skip them.

Fixes #67635.

Change-Id: Ic0e64bd032be499cca26da5e9e3ffbe9998bac05
Reviewed-on: https://go-review.googlesource.com/c/go/+/588316
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-06-07 14:52:41 +00:00
Anuraag Agrawal f7c330eac7 runtime: add a note on SetFinalizer doc about method receiver
A method receiver can be collected during the execution of that method.
This does make sense when thinking about how the GC would work, but
also seems not very obvious, so a point in the docs can increase the
chance of avoiding issues caused by missing KeepAlive of method
receivers.

Change-Id: I6817237dd022b5729dbdcda1b9f70c7059605575
GitHub-Last-Rev: 878bf3fde7
GitHub-Pull-Request: golang/go#67777
Reviewed-on: https://go-review.googlesource.com/c/go/+/589735
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-06-07 01:56:56 +00:00
Damien Neil cf501e05e1 net/http: send body or close connection on expect-100-continue requests
When sending a request with an "Expect: 100-continue" header,
we must send the request body before sending any further requests
on the connection.

When receiving a non-1xx response to an "Expect: 100-continue" request,
send the request body if the connection isn't being closed after
processing the response. In other words, if either the request
or response contains a "Connection: close" header, then skip sending
the request body (because the connection will not be used for
further requests), but otherwise send it.

Correct a comment on the server-side Expect: 100-continue handling
that implied sending the request body is optional. It isn't.

For #67555

Change-Id: Ia2f12091bee697771087f32ac347509ec5922d54
Reviewed-on: https://go-review.googlesource.com/c/go/+/591255
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2024-06-06 21:59:21 +00:00
Michael Matloob 2f6ba0c294 cmd/go/internal/modget: print a fatal error if -d=false
Between Go 1.18 and Go 1.22 go get printed a fatal error if -d was
explicitly set to false. That behavior was reverted in CL 572176, when
we made the -d flag a no-op, but it would make it easier to remove the
-d flag in the future if we continue to print a fatal error if -d is
explicitly set to false.

This change brings back the fatal error for -d=false while keeping the
warning printed for -d=true.

For #43684

Change-Id: I38ae3a3619d408c0237ff485ddee4403b8188abd
Reviewed-on: https://go-review.googlesource.com/c/go/+/591135
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
2024-06-06 19:50:03 +00:00
Michael Matloob 4b0dd55608 cmd/go/internal/modload: add line numbers to godebug errors
In addition, add a line number to the go.work error for multiple use statements
for the same directory. Also clean up the error prefix for go.work
errors now containing line numbers.

Fixes #67623

Change-Id: Ia7edcc50f7d7ec907b4a9eb4fe270c75d04c1fa5
Reviewed-on: https://go-review.googlesource.com/c/go/+/590135
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
Auto-Submit: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-06-06 18:36:30 +00:00
Michael Matloob 2be4b3913a cmd/go/internal/modload: respect overlays when loading go.work files
Before this change, we didn't initialize the overlays in the fsys
package or use the fsys logic to read the files, so overlays were not
respected for go.work files. Initialize fsys before loading the go.work
file (initialization is idempotent) and use the new fsys.ReadFile
function to read the file instead of os.ReadFile.

fsys.ReadFile just opens the file with fsys.Open and then calls
io.ReadAll on it. (This is less efficient than what os.ReadFile does:
os.ReadFile reads into a buffer it allocated that's the file's size
while io.ReadAll doesn't know how big the file is so it just reads in
512 byte chunks.)

Change-Id: Ic40bcbb483a16c5d4dd1d896306ea99a16f370f3
Reviewed-on: https://go-review.googlesource.com/c/go/+/590755
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Matloob <matloob@golang.org>
2024-06-06 18:35:34 +00:00
Robert Griesemer 1831437f19 math/big: better doc string for Float.Copy, add example test
Fixes #66358.

Change-Id: Ic9bde88eabfb2a446d32e1dc5ac404a51ef49f11
Reviewed-on: https://go-review.googlesource.com/c/go/+/590635
Auto-Submit: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
2024-06-06 15:46:54 +00:00
Keith Randall 45967bb18e runtime: soften up the GCTestIsReachable test a bit
This test can fail due to objects being incorrectly retained due
to conservative scanning. Allow a bit of slop (1 accidentally
retained object) to prevent flaky failures.

Fixes #67204

"fixes" is a bit too strong a word. More like, hopefully reduces
the false positive rate to something approaching 0.

Change-Id: I09984f0cce50d8209aef19f3d89b0e295c86f8d1
Reviewed-on: https://go-review.googlesource.com/c/go/+/590615
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-06-05 22:33:52 +00:00
Robert Griesemer 7274921681 doc: document new default for GODEBUG gotypesalias setting in release notes
For #65614.

Change-Id: I9487521817348053170da293c01ac55f6e3dcd20
Reviewed-on: https://go-review.googlesource.com/c/go/+/590895
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2024-06-05 21:30:00 +00:00
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