1
0
mirror of https://github.com/golang/go synced 2024-11-17 05:35:00 -07:00
Commit Graph

58803 Commits

Author SHA1 Message Date
qiulaidongfeng
3e95b71384 remove todo 2023-12-14 21:04:59 +08:00
qiulaidongfeng
d1b635ab5f Revert "runtime: delete the list field for mspan"
This reverts commit 0c7a12e9dc4b5bede69d13bb34f69f9be670472b.
2023-12-14 21:04:59 +08:00
qiulaidongfeng
55215b9078 runtime: delete the list field for mspan
Complete a TODO.
2023-12-14 21:04:59 +08:00
Robert Griesemer
6146a73d27 go/types, types2: report error for range over int if Go version < 1.22
Fixes #64704.

Change-Id: Ied3af46ab534343cdafba5ee27680b9c6ef3d37a
Reviewed-on: https://go-review.googlesource.com/c/go/+/549459
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-12-13 22:57:57 +00:00
Tolya Korniltsev
d95e25e83c runtime/pprof: fix inlined generics locations
When generic function[a,b] is inlined to the same generic function[b,a]
with different types (not recursion) it is expected to get a pprof with
a single Location with two functions. However due to incorrect check
for generics names using runtime.Frame.Function, the profileBuilder
assumes it is a recursion and emits separate Location.

This change fixes the recursion check for generics functions by using
runtime_expandFinalInlineFrame

Fixes #64641

Change-Id: I3f58818f08ee322b281daa377fa421555ad328c9
Reviewed-on: https://go-review.googlesource.com/c/go/+/549135
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2023-12-13 20:40:52 +00:00
Robert Griesemer
cc5ccd71ef doc: in pre-generic spec, be explicit that it is not the current spec
Change-Id: I4cf7efc8e704d41ee2e3743f6aa712cc46dd1fe9
Reviewed-on: https://go-review.googlesource.com/c/go/+/549515
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
2023-12-13 20:38:46 +00:00
Robert Griesemer
0b3dd75f6c go/types, types2: better error message when missing method is unexported
Change lookupMethod such that "foldCase" means "ignore case
and package" and analyze a lookup result further to determine
if a method name was not exported, and report a better error
message in that case.

Fixes #59831.

Change-Id: Ice6222e1fc00dba13caeda6c48971e8473d12da5
Reviewed-on: https://go-review.googlesource.com/c/go/+/549298
Run-TryBot: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
2023-12-13 17:54:56 +00:00
Mauri de Souza Meneguzzo
f2d243db8f iter: fix race instrumentation for Pull2
Pull2 tests are failing with -race, giving false-positive race conditions
due to bad race instrumentation.

No tests for this as it should be caught by the race builders. The only
reason it was not caught is because it is behind GOEXPERIMENT=rangefunc.

Fixes #64651

Change-Id: I20554da930b0e19594e0e267f01a1e7a9cbc577a
GitHub-Last-Rev: 7c1f19238d
GitHub-Pull-Request: golang/go#64653
Reviewed-on: https://go-review.googlesource.com/c/go/+/548895
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2023-12-13 16:20:09 +00:00
Robert Griesemer
58c28ba286 go/types, types2: avoid confusing error message "have m(T), want m(T)"
This is a partial fix for situations where a method lookup leads to
an error due to non-matching signatures, but where the signatures
print exactly the same. This can happen if both signatures contain
type parameters (after instantiation) and the type parameters have
the same name (such as "T").

For now, rather than printing a confusing error message in this
case, leave away the confusing part of the error message (at the
cost of providing slightly less information).

In the long run, we need to find a better solution for this problem;
but this seems better than what we had before.

For #61685.

Change-Id: I259183f08b9db400ffc8e1cf447967c640a0f444
Reviewed-on: https://go-review.googlesource.com/c/go/+/549296
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
2023-12-13 14:32:38 +00:00
Mauri de Souza Meneguzzo
7cac742f17 doc/go1.22: document reflect.TypeFor
Change-Id: I122a3422f541f66d9f6e644a9f287f0e5a5729d2
GitHub-Last-Rev: 1d9fe39d0c
GitHub-Pull-Request: golang/go#64688
Reviewed-on: https://go-review.googlesource.com/c/go/+/549295
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2023-12-13 00:46:41 +00:00
Roland Shoemaker
400e24a8be crypto/x509: properly gate test on macos version
Fixes the gating of TestIssue51759 by shelling out to sw_vers to check
what version of macOS we are on.

Fixes #64677

Change-Id: I5eef4fa39e5449e7b2aa73864625c3abf002aef8
Reviewed-on: https://go-review.googlesource.com/c/go/+/549195
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2023-12-13 00:22:17 +00:00
Damien Neil
89c532e8b2 doc/go1.22: document minor net/http changes
For #51971
For #61679

Change-Id: Ie7b44201a9c40f5563c6d6051d22ae807ad0480d
Reviewed-on: https://go-review.googlesource.com/c/go/+/549198
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
2023-12-12 22:14:14 +00:00
Damien Neil
dce7f335c5 doc/go1.22: document zero-copy to net.UnixConn
For #58808

Change-Id: Id73b9e4b5fb96426a01b76ce7a1053a6ad61a58e
Reviewed-on: https://go-review.googlesource.com/c/go/+/549197
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Auto-Submit: Damien Neil <dneil@google.com>
2023-12-12 22:10:52 +00:00
qmuntal
962dade46b doc: document SetUnhandledExceptionFilter interop
For #50951.
For #61422.

Change-Id: Ib9038a00de8f4d8606443e9acd414402023cde63
Reviewed-on: https://go-review.googlesource.com/c/go/+/548319
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2023-12-12 20:05:45 +00:00
Damien Neil
4daf924f63 doc/go1.22: remove reference to #60107
This was implemented in Go 1.21.

Change-Id: Ic434670938589f10f367b1f893c4427e6f0b991c
Reviewed-on: https://go-review.googlesource.com/c/go/+/549196
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
2023-12-12 19:57:03 +00:00
Mauri de Souza Meneguzzo
c2079deb24 cmd/cgo/internal/testsanitizers: check for go build and cgo in fuzzer and msan tests
Make sure the platform we are running the tests on can compile programs
and has cgo support in order to run the fuzzer and msan tests. This is the
same approach used by the asan tests, which share the same requirements.

Fixes #64626

Change-Id: I7c0b912dabdd1b7d7d44437e4ade5e5994994796
GitHub-Last-Rev: 9fae6970f0
GitHub-Pull-Request: golang/go#64640
Reviewed-on: https://go-review.googlesource.com/c/go/+/548715
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
2023-12-12 19:42:27 +00:00
Robert Griesemer
0ac1e3b245 go/types, types2: flip message contents for reverse type inference errors
Add a new flag 'reverse' to control the formatting of type inference
error messages.

This change only impacts error messages.

Fixes #60747.

Change-Id: I81e13075e3157252ccc09f358bd29bd676c34499
Reviewed-on: https://go-review.googlesource.com/c/go/+/549055
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-12-12 18:44:59 +00:00
Robert Griesemer
2643a59172 go/types, types2: better error message for cases of reverse type inference
Introduce a new type "target" to pass around target types together
with a suitable description (typically a variable name) for a better
error message.

As a side effect, using a specific type (target), rather than just Type
avoids accidental confusion with other types.

Use the target type description for a better error message in some
cases.

The error message can be further improved by flipping the order of
the sentence (for another CL to keep this one small and simple).

Also, and unrelated to this fix, remove the first argument to errorf
in infer.go: the argument is always "type" (there's only one call).

For #60747.

Change-Id: I2118d0fe9e2b4aac959371941064e0e9ca7b3b6e
Reviewed-on: https://go-review.googlesource.com/c/go/+/548995
Auto-Submit: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-12-12 18:44:28 +00:00
Bryan C. Mills
699807f323 doc/go1.22: remove empty cgo section
The only issue in this section, #56378, does not need a release note
for Go 1.22 because its feature was disabled for this release.

For #61422.
Updates #56378.

Change-Id: Ia4e090994cd9ac04e855f8b3a2c6ca0cde4485d2
Reviewed-on: https://go-review.googlesource.com/c/go/+/548876
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2023-12-12 18:40:59 +00:00
Alan Donovan
ce43fb806f doc/go1.22: document ast.Unparen
Updates #60061

Change-Id: Ifa51f0bac0346ebc352c7524204aa94336a2b5ad
Reviewed-on: https://go-review.googlesource.com/c/go/+/548882
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
2023-12-12 17:12:55 +00:00
Robert Griesemer
7baaa20e38 doc: emphasize gotypesalias GODEBUG flag in go 1.22 release notes
Per discussion with rfindley.

Change-Id: Ia1cff05aff724eb8c919ffcc1fac121ca017efe9
Reviewed-on: https://go-review.googlesource.com/c/go/+/549056
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2023-12-12 16:45:47 +00:00
Michael Pratt
018c1da0cf doc/go1.22: document io changes
Change-Id: I1dd4030782ad20512836927d42bc8fe3d93437d7
Reviewed-on: https://go-review.googlesource.com/c/go/+/548880
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2023-12-12 16:30:08 +00:00
Michael Pratt
1541af5ce8 doc/go1.22: document bufio changes
For #61422.

Change-Id: I1b20c536a5b1c105286c84e7c1c7e37eb89bbc93
Reviewed-on: https://go-review.googlesource.com/c/go/+/548879
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2023-12-12 16:29:33 +00:00
Michael Pratt
3f442ab062 doc/go1.22: document archive/tar and archive/zip changes
For #61422.

Change-Id: Icf56cba0ac40b46caf3072bf2951b07403f47f36
Reviewed-on: https://go-review.googlesource.com/c/go/+/548939
Auto-Submit: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2023-12-12 16:29:03 +00:00
Bryan C. Mills
e70d343306 cmd/go: explicitly name the default branch “main” in testdata/vcstest/git/issue57650.txt
Updates #47650.

Change-Id: I90c0a51b390326129643d5b90fe935d44e5e5372
Reviewed-on: https://go-review.googlesource.com/c/go/+/549155
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2023-12-12 16:13:43 +00:00
Roland Shoemaker
b18b058816 crypto/x509: gate Policies marshaling with GODEBUG
Use a GODEBUG to choose which certificate policy field to use. If
x509usepolicies=1 is set, use the Policies field, otherwise use the
PolicyIdentifiers field.

Fixes #64248

Change-Id: I3f0b56102e0bac4ebe800497717c61c58ef3f092
Reviewed-on: https://go-review.googlesource.com/c/go/+/546916
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2023-12-11 23:29:45 +00:00
Bryan C. Mills
f4ff0e2505 net: remove an arbitrary timeout in TestAcceptTimeoutMustReturn
This probably fixes the failure mode seen in
https://build.golang.org/log/e73acfd930cbe82302505cac0041d9883e2360c5.

If not, allowing the test to deadlock and dump goroutines
should produce better debugging information than the existing
"didn't return in an expected time" failure message.

For #58901.

Change-Id: Ie0bb1887a4329d2f6b0e7348a4820af71385494e
Reviewed-on: https://go-review.googlesource.com/c/go/+/548881
Auto-Submit: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
2023-12-11 23:01:52 +00:00
Bryan C. Mills
a839ec1e73 cmd/go/internal/modload: classify "invalid pseudo-version" errors in Query
If we encounter an unclassified error in modload.Query, it takes
precedence even if the package is found in some other module.
(That is intentional, so that if a package exists in both a parent
and a nested module the outcome is deterministic, and does not shift
if a temporary error causes one of the modules to be unavailable.)

A pseudo-version is formed from a base version and a commit hash.
Each version tag is specific to the module in a particular directory
of the repo (often the root directory), whereas the commit hash is
the same for all subdirectories. When we go to check a particular
subdirectory for the requested package, we may find that that version
is not valid for that combination of <subdirectory, commit hash>,
but we should keep looking to see whether it is valid for a module
in some other subdirectory.

Fixes #47650.

Change-Id: Id48f590ce906a3d4cf4e82fc66137bf67613277d
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/548475
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
2023-12-11 22:29:11 +00:00
qmuntal
e872807e2b doc: document SEH changes
For #57302.
For #61422.

Change-Id: Iee4e6600bf473eb982d0cb7330f7b2c1b48b9e13
Reviewed-on: https://go-review.googlesource.com/c/go/+/548575
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2023-12-11 21:47:33 +00:00
Michael Pratt
c22781cb33 doc/go1.22: remove compiler TODO
For #61422.

Change-Id: Id4eed9affde20857d6b60c0b6d7d1443ea5e460b
Reviewed-on: https://go-review.googlesource.com/c/go/+/548938
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
2023-12-11 21:37:48 +00:00
Michael Pratt
d0ed476f3e doc/go1.22: add TODOs for missing APIs
Add TODOs for APIs mentioned in api/go1.22.txt but missing from the
release notes.

The issue list was generated with:

    $ awk '{print substr($NF, 2, length($NF)-1)}' < ../api/go1.22.txt | uniq | xargs -I{} sh -c 'echo -n "{}: " && grep -c {} ../doc/go1.22.html'

For #61422.

Change-Id: I85d41c28530e6b5e3e388a41206b251278c91dd5
Reviewed-on: https://go-review.googlesource.com/c/go/+/548937
Auto-Submit: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2023-12-11 21:08:49 +00:00
Michael Pratt
78dcb5327a doc/go1.22: document syscall changes
For #61422.

Change-Id: I976b8cc14893b91e5140c7b53d0773bca57cb19d
Reviewed-on: https://go-review.googlesource.com/c/go/+/548936
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2023-12-11 20:30:39 +00:00
Bryan C. Mills
100651b6f2 doc/go1.22: document workspace vendoring
For #61422.
Updates #60056.

Change-Id: Ie7c7e12acc173f1ff1644555016e51a52509bd6d
Reviewed-on: https://go-review.googlesource.com/c/go/+/548815
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2023-12-11 19:59:27 +00:00
Michael Pratt
c844970ffb doc/go1.22: fix stale id for math/rand/v2
For #61422.

Change-Id: If87f30229e5e5351e81d42c777259335af3533e6
Reviewed-on: https://go-review.googlesource.com/c/go/+/548878
Auto-Submit: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2023-12-11 19:32:56 +00:00
Michael Anthony Knyszek
9db508d46f doc: fix formatting of runtime and runtime/trace release notes
For #61422.

Change-Id: I621627140d2d5ebede9b932a7e55fbe92ded5249
Reviewed-on: https://go-review.googlesource.com/c/go/+/548935
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
2023-12-11 19:03:36 +00:00
Tolya Korniltsev
20a03fc713 runtime/pprof: fix generics function names
profileBuilder is using Frame->Function as key for checking if we already
emitted a function. However for generics functions it has dots there [...],
so sometimes for different functions with different generics types,
the profileBuilder emits wrong functions.

Fixes #64528

Change-Id: I8b39245e0b18f4288ce758c912c6748f87cba39a
Reviewed-on: https://go-review.googlesource.com/c/go/+/546815
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
2023-12-11 17:49:10 +00:00
Keith Randall
052d402985 runtime: clear mspan.largeType more carefully in the case of arenas
The pointer stored in mspan.largeType is an invalid pointer when
the span is an arena. We need to make sure that pointer isn't seen
by the garbage collector, as it might barf on it. Make sure we
zero the pointer using a uintptr write so the old value isn't picked
up by the write barrier.

The mspan.largeType field itself is in a NotInHeap struct, so a heap
scan won't find it. The only way we find it is when writing it, or
when reading it and putting it in a GC-reachable location. I think we
might need to audit the runtime to make sure these pointers aren't
being passed in places where the GC might (non-conservatively) scan a
stack frame it lives in. (It might be ok, many such places are either
systemstack or nosplit.)

Change-Id: Ie059d054e0da4d48a4c4b3be88b8e1e46ffa7d10
Reviewed-on: https://go-review.googlesource.com/c/go/+/548535
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2023-12-11 17:15:22 +00:00
Bryan C. Mills
59275e266a doc: document os/exec changes on Windows
For #61422.
Updates #62596.
Updates #61493.

Change-Id: I5c910f9961da24d90b3618ee53540118db06ff91
Reviewed-on: https://go-review.googlesource.com/c/go/+/548481
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2023-12-11 16:13:01 +00:00
Russ Cox
ba7c4e47b3 os: limit temp file randomness to uint32
CL 516860 accidentally changed the randomness
used in TempFile from 32 to 64 bits on 64-bit platforms,
meaning from 10 to 20 decimal bytes.
This is enough to cause problems in a few tests
because it makes temporary directory names just
a little bit longer.

Limit back down to 32 bits of randomness, which is fine,
and add a test to avoid repeating the mistake.

Fixes #64605.

Change-Id: I17b8c063d11d5c0a96a68b5e5f83c889a13bca77
Reviewed-on: https://go-review.googlesource.com/c/go/+/548635
Reviewed-by: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Russ Cox <rsc@golang.org>
2023-12-11 15:36:54 +00:00
qmuntal
46ea4ab5cb doc: document that os.Stat follows all link reparse points on Windows
For #61422.

Change-Id: I2bb59a1ae38c40368343414a6077bb09c1675a6b
Reviewed-on: https://go-review.googlesource.com/c/go/+/548315
Reviewed-by: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2023-12-09 21:48:06 +00:00
qmuntal
ca804118b1 doc: document that the Windows hosts file is now respected
For #57757.
For #61422.

Change-Id: Icbe9a86b43eb0816dc5899a1c14b50ee22db1c5d
Reviewed-on: https://go-review.googlesource.com/c/go/+/548095
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2023-12-09 21:47:36 +00:00
David Chase
fe1b2f95e6 doc: describe for loop changes (lifetime, range int; range func experiment)
See also https://go.dev/wiki/RangefuncExperiment, written as a companion
to this change.

For #61422.

Change-Id: I129bf38dd2fa4aef47454138b4ca5ed18653aecf
Reviewed-on: https://go-review.googlesource.com/c/go/+/546095
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
2023-12-08 23:05:48 +00:00
Cherry Mui
f360ffd95a doc/go1.22: document that reflect.PtrTo is deprecated
Updates #59599.
For #61422.

Change-Id: I923be38b719a78dd983372acad93f710a53b0922
Reviewed-on: https://go-review.googlesource.com/c/go/+/548036
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Bypass: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
2023-12-08 21:00:53 +00:00
Cherry Mui
b55bf2d786 doc/go1.22: remove stale TODO and comments for vet changes
They are already mentioned in the Vet section.

For #61422.

Change-Id: I773881df8c6a97263fc3d516e1d38b95679f2693
Reviewed-on: https://go-review.googlesource.com/c/go/+/548480
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Bypass: Cherry Mui <cherryyz@google.com>
2023-12-08 20:36:40 +00:00
Cherry Mui
9869a0ce7e doc/go1.22: fix go test -cover formatting
For #61422.

Change-Id: I3591673b55fef35bc429d2e1ce4bc72c0129c03c
Reviewed-on: https://go-review.googlesource.com/c/go/+/548479
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2023-12-08 20:35:29 +00:00
Cherry Mui
aa4a95011c doc/go1.22: document additional constants in debug/elf package
Updates #61974, #63725.
For #61422.

Change-Id: Ifd6c62e877dbd13f0e86fef801fe70d39fb3a66b
Reviewed-on: https://go-review.googlesource.com/c/go/+/548478
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2023-12-08 20:35:17 +00:00
Robert Griesemer
e1cba47ee0 go/parser: fix panic in object resolution for invalid type parameter list
This change restores the original logic in parseParameterList to what
it was before CL 538858 (which caused the issue), not in exact wording
but in identical semantic meaning, and thus restores this function to
a state that we know was working fine.

However, the change keeps the improved error reporting introduced by
CL 538858. To keep the code changes somewhat minimal as we are close
to RC1, the improved error handling exists twice for now even though
it could be factored out.

Fixes #64534.

Change-Id: I0b7bbf74d28811e8aae74f838f2d424f78af1f38
Reviewed-on: https://go-review.googlesource.com/c/go/+/548395
Reviewed-by: Alan Donovan <adonovan@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-12-08 20:07:50 +00:00
Bryan C. Mills
6cdf2ccae8 cmd/go: relax version regexp from CL 547998
In CL 547998 I relaxed cmd/go's parsing of version lines to allow it
to recognize clang versions with vendor prefixes. To prevent false-positives,
I added a check for a version 3-tuple following the word "version".
However, it appears that some releases of GCC use only a 2-tuple instead.

Updates #64423.
Fixes #64619.

Change-Id: I5f1d0881b6295544a46ab958c6ad4c2155cf51fe
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/548120
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2023-12-08 18:34:24 +00:00
eric fang
78b42a5338 cmd/internal/obj/arm64: fix invalid register pair for LDP
ZR register can be used in register pair of LDP, LDPW and LDPSW
instructions, but now it's not allowed. This CL fixes this issue.

Change-Id: I8467502de4664214e0b7dad0295c44f6cff16ee6
Reviewed-on: https://go-review.googlesource.com/c/go/+/547815
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Eric Fang <eric.fang@arm.com>
2023-12-08 03:28:17 +00:00
Raghvender
4bf1ca4b0c cmd/compile: fix error message for mismatch between the number of type params and arguments
Fixes #64276

Change-Id: Ib6651669904e6ea0daf275d85d8bd008b8b21cc6
Reviewed-on: https://go-review.googlesource.com/c/go/+/544018
Reviewed-by: raghvender sundarjee <raghvenders@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-12-08 00:50:55 +00:00