aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-02-01[release-branch.go1.20] go1.20go1.20Gopher Robot
Change-Id: I156873d216ccb7d91e716b4348069df246b527b3 Reviewed-on: https://go-review.googlesource.com/c/go/+/464496 Run-TryBot: Gopher Robot <gobot@golang.org> Auto-Submit: Gopher Robot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com>
2023-01-26[release-branch.go1.20] internal/coverage/decodemeta: fix coding error in ↵Than McIntosh
func literal handling Fix a coding error in coverage meta-data decoding in the method decodemeta.CoverageMetaDataDecoder.ReadFunc. The code was not unconditionally assigning the "function literal" field of the coverage.FuncDesc object passed in, resulting in bad values depending on what the state of the field happened to be in the object. Fixes #57942. Change-Id: I6dfd7d7f7af6004f05c622f9a7116e9f6018cf4f Reviewed-on: https://go-review.googlesource.com/c/go/+/462955 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> (cherry picked from commit 620399ef0d1390a8f7e7061a45d5304ed087889a) Reviewed-on: https://go-review.googlesource.com/c/go/+/463418 Reviewed-by: Than McIntosh <thanm@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> Auto-Submit: Matthew Dempsky <mdempsky@google.com>
2023-01-26[release-branch.go1.20] runtime/coverage: avoid non-test coverage profiles ↵Than McIntosh
in test report helper When walking through the set of coverage data files generated from a "go test -cover" run, it's possible to encounter pods (clumps of data files) that were generated by a run from an instrumented Go tool (for example, cmd/compile). Add a guard to the test reporting code to ensure that it only processes files created by the currently running test. Fixes #57924. Change-Id: I1bb7dce88305e1088162e3cb1df628486ecee1c1 Reviewed-on: https://go-review.googlesource.com/c/go/+/462756 Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Than McIntosh <thanm@google.com> (cherry picked from commit cf70d37967b8447af8305e02ef534c4c5f42d49c) Reviewed-on: https://go-review.googlesource.com/c/go/+/463417 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Auto-Submit: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Than McIntosh <thanm@google.com>
2023-01-25[release-branch.go1.20] sync: document memory model for ↵Changkun Ou
Swap/CompareAnd{Swap,Delete} in Map CL 381316 documented the memory model of Map's APIs. However, the newly introduced Swap, CompareAndSwap, and CompareAndDelete are missing from this documentation as CL 399094 did not add this info. This CL specifies the defined read/write operations of the new Map APIs. For #51972 Change-Id: I519a04040a0b429a3f978823a183cd62e42c90ae Reviewed-on: https://go-review.googlesource.com/c/go/+/459715 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Run-TryBot: Changkun Ou <mail@changkun.de> Auto-Submit: Bryan Mills <bcmills@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> (cherry picked from commit f07910bd577f73b81e4f7117c7cfdf9cf7579028) Reviewed-on: https://go-review.googlesource.com/c/go/+/463416 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Auto-Submit: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Changkun Ou <mail@changkun.de>
2023-01-25[release-branch.go1.20] Revert "cmd/compile: teach prove about bitwise OR ↵Keith Randall
operation" This reverts commit 3680b5e9c4f42fcf9155aa42b3b344d1fbe19571. Reason for revert: causes long compile times on certain functions. See issue #57959 Change-Id: Ie9e881ca8abbc79a46de2bfeaed0b9d6c416ed42 Reviewed-on: https://go-review.googlesource.com/c/go/+/463295 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> (cherry picked from commit a6ddb15f8f5955d93eeb2f674ec564ffd4530c18) Reviewed-on: https://go-review.googlesource.com/c/go/+/463415 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Keith Randall <khr@google.com>
2023-01-18[release-branch.go1.20] time: revert strict parsing of RFC 3339Joe Tsai
CL 444277 fixed Time.UnmarshalText and Time.UnmarshalJSON to properly unmarshal timestamps according to RFC 3339 instead of according to Go's bespoke time syntax that is a superset of RFC 3339. However, this change seems to have broken an AWS S3 unit test that relies on parsing timestamps with single digit hours. It is unclear whether S3 emits these timestamps in production or whether this is simply a testing artifact that has been cargo culted across many code bases. Either way, disable strict parsing for now and re-enable later with better GODEBUG support. Updates #54580 Change-Id: Icced2c7f9a6b2fc06bbd9c7e90f90edce24c2306 Reviewed-on: https://go-review.googlesource.com/c/go/+/462286 Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Joseph Tsai <joetsai@digital-static.net> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Russ Cox <rsc@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-on: https://go-review.googlesource.com/c/go/+/462675 Reviewed-by: Joseph Tsai <joetsai@digital-static.net> Run-TryBot: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
2023-01-18[release-branch.go1.20] cmd: update x/tools to latest internal Go 1.20 branchRuss Cox
Import x/tools as of CL 462596 (070db2996ebe, Jan 18 2022), to bring in two vet analysis fixes (printf and loopclosure). For #57911. Fixes #57903. Fixes #57904. Change-Id: I82fe4e9bd56fb8e64394ee8618c155316942a517 Reviewed-on: https://go-review.googlesource.com/c/go/+/462555 Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Bryan Mills <bcmills@google.com> Auto-Submit: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-on: https://go-review.googlesource.com/c/go/+/462695 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
2023-01-18[release-branch.go1.20] cmd/compile: fix unsafe.{SliceData,StringData} ↵Cuong Manh Le
escape analysis memory corruption Updates #57823 Updates #57854 Change-Id: I54654d3ecb20b75afa9052c5c9db2072a86188d4 Reviewed-on: https://go-review.googlesource.com/c/go/+/461759 Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-on: https://go-review.googlesource.com/c/go/+/461760
2023-01-17[release-branch.go1.20] cmd/compile: fix static init inlining for hidden ↵Matthew Dempsky
node fields Unified IR added several new IR fields for holding *runtime._type expressions. To avoid throwing off any frontend semantics (particularly inlining cost heuristics), they were marked as `mknode:"-"` so that code wouldn't visit them. Unfortunately, this has a bad interaction with the static init inlining optimization, because the latter relies on ir.EditChildren to substitute all parameters. This potentially includes dictionary parameters, which can appear within the new RType fields. This CL adds a new ir.EditChildrenWithHidden function that also edits these fields, and switches staticinit to use it. Longer term, we should unhide the RType fields so that ir.EditChildren visits them normally, but that's scarier so late in the release cycle. Updates #57778. Updates #57854. Change-Id: I98c1e8cf366156dc0c81a0cb79029cc5e59c476f Reviewed-on: https://go-review.googlesource.com/c/go/+/461686 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> (cherry picked from commit 9f2fbedf010d59c3ecaa8c25b07a5f68fcb2e3d5) Reviewed-on: https://go-review.googlesource.com/c/go/+/462535 Auto-Submit: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
2023-01-17[release-branch.go1.20] all: merge master (9088c69) into release-branch.go1.20Cherry Mui
Merge List: + 2023-01-17 9088c691da cmd/compile: ensure temp register mask isn't empty + 2023-01-17 c0799f7015 os: document that Rename is not atomic on non-Unix platforms + 2023-01-17 d74c31f0ba doc/go1.20: update cryptography release notes + 2023-01-17 8e19929436 strings: remove redundant symbols + 2023-01-17 6cb8c43b84 cmd/go: include coverage build flags for "go list" + 2023-01-17 02ed0e5e67 crypto/ed25519: improve Ed25519ctx docs and add example + 2023-01-17 f375b305c8 crypto/x509: clarify that CheckSignatureFrom and CheckSignature are low-level APIs + 2023-01-17 8409251e10 cmd/go: document GODEBUG=installgoroot=all + 2023-01-17 66689c7d46 doc/go1.20: remove mention of arena goexperiment + 2023-01-17 145dd38471 archive/tar, archive/zip: document ErrInsecurePath and GODEBUG setting + 2023-01-16 1c65b69bd1 runtime: fix performance regression in morestack_noctxt on ppc64 + 2023-01-13 ebb572d82f Revert "internal/fsys: follow root symlink in fsys.Walk" + 2023-01-13 16cec4e7a0 doc/go1.20: mention build speed improvements + 2023-01-13 643f463186 cmd/cover: remove go.mod from testdata subdir Change-Id: I4d56c9353d423f7e7169db7e30cb59515d422a56
2023-01-17cmd/compile: ensure temp register mask isn't emptyKeith Randall
We need to avoid nospill registers at this point in regalloc. Make sure that we don't restrict our register set to avoid registers desired by other instructions, if the resulting set includes only nospill registers. Fixes #57846 Change-Id: I05478e4513c484755dc2e8621d73dac868e45a27 Reviewed-on: https://go-review.googlesource.com/c/go/+/461685 Reviewed-by: Keith Randall <khr@google.com> Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2023-01-17os: document that Rename is not atomic on non-Unix platformsAlan Donovan
Windows provides no reliable way to rename files atomically. The Plan 9 implementation of os.Rename performs a deletion if the target exists. Change-Id: Ife5f9c97b21f48c11e300cd76d8c7f715db09fd4 Reviewed-on: https://go-review.googlesource.com/c/go/+/462395 Auto-Submit: Alan Donovan <adonovan@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Alan Donovan <adonovan@google.com> Reviewed-by: Bryan Mills <bcmills@google.com>
2023-01-17doc/go1.20: update cryptography release notesFilippo Valsorda
Change-Id: I5d6d2bd5cbb246ea514e5adbe936fb31b92904af Reviewed-on: https://go-review.googlesource.com/c/go/+/459978 Run-TryBot: Filippo Valsorda <filippo@golang.org> Reviewed-by: Roland Shoemaker <roland@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Filippo Valsorda <filippo@golang.org>
2023-01-17strings: remove redundant symbolsfangguizhen
Change-Id: Ie3fe0274288d6cb6303acdcec1340c480e5c0b20 GitHub-Last-Rev: ce9d44619e970b1319fbccf3aace1ddf719bcec1 GitHub-Pull-Request: golang/go#57848 Reviewed-on: https://go-review.googlesource.com/c/go/+/462277 Run-TryBot: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Keith Randall <khr@golang.org>
2023-01-17cmd/go: include coverage build flags for "go list"Than McIntosh
This patch ensures that the go command's "list" subcommand accepts coverage-related build options, which were incorrectly left out when "go build -cover" was rolled out. This is needed in order to do things like check the staleness of an installed cover-instrumented target. Fixes #57785. Change-Id: I140732ff1e6b83cd9c453701bb8199b333fc0f2e Reviewed-on: https://go-review.googlesource.com/c/go/+/462116 Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2023-01-17crypto/ed25519: improve Ed25519ctx docs and add exampleFilippo Valsorda
Change-Id: Ic215a90d1e1daa5805dbab1dc56480281e53b341 Reviewed-on: https://go-review.googlesource.com/c/go/+/459975 Auto-Submit: Filippo Valsorda <filippo@golang.org> Run-TryBot: Filippo Valsorda <filippo@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Roland Shoemaker <roland@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
2023-01-17crypto/x509: clarify that CheckSignatureFrom and CheckSignature are ↵Filippo Valsorda
low-level APIs In particular, CheckSignatureFrom just can't check the path length limit, because it might be enforced above the parent. We don't need to document the supported signature algorithms for CheckSignatureFrom, since we document at the constants in what contexts they are allowed and not. That does leave CheckSignature ambiguous, though, because that function doesn't have an explicit context. Change-Id: I4c107440a93f60bc0de07df2b7efeb1a4a766da0 Reviewed-on: https://go-review.googlesource.com/c/go/+/460537 Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Roland Shoemaker <roland@golang.org> Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
2023-01-17cmd/go: document GODEBUG=installgoroot=allRuss Cox
At the moment the only documentation is the release notes, but everything mentioned in the release notes should have proper documentation separate from them. Change-Id: I9885962f6c6d947039b0be59b608385781479271 Reviewed-on: https://go-review.googlesource.com/c/go/+/462196 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com>
2023-01-17doc/go1.20: remove mention of arena goexperimentRuss Cox
The arena goexperiment contains code used inside Google in very limited use cases that we will maintain, but the discussion on #51317 identified serious problems with the very idea of adding arenas to the standard library. In particular the concept tends to infect many other APIs in the name of efficiency, a bit like sync.Pool except more publicly visible. It is unclear when, if ever, we will pick up the idea and try to push it forward into a public API, but it's not going to happen any time soon, and we don't want users to start depending on it: it's a true experiment and may be changed or deleted without warning. The arena text in the release notes makes them seem more official and supported than they really are, and we've already seen a couple blog posts based on that erroneous belief. Delete the text to try to set expectations better. Change-Id: I4f6e328ac470a9cd410f5f722d0769ef62d5e5ba Reviewed-on: https://go-review.googlesource.com/c/go/+/462355 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Russ Cox <rsc@golang.org> Auto-Submit: Russ Cox <rsc@golang.org> Reviewed-by: Eli Bendersky <eliben@google.com>
2023-01-17archive/tar, archive/zip: document ErrInsecurePath and GODEBUG settingRuss Cox
These are mentioned in the release notes but not the actual doc comments. Nothing should exist only in release notes. Change-Id: I8d10f25a2c9b2677231929ba3f393af9034b777b Reviewed-on: https://go-review.googlesource.com/c/go/+/462195 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Damien Neil <dneil@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2023-01-16runtime: fix performance regression in morestack_noctxt on ppc64Archana R
In the fix for 54332 the MOVD R1, R1 instruction was added to morestack_noctxt function to set the SPWRITE bit. However, the instruction MOVD R1, R1 results in or r1,r1,r1 which is a special instruction on ppc64 architecture as it changes the thread priority and can negatively impact performance in some cases. More details on such similar nops can be found in Power ISA v3.1 Book II on Power ISA Virtual Environment architecture in the chapter on Program Priority Registers and Or instructions. Replacing this by OR R0, R1 has the same affect on setting SPWRITE as needed by the first fix but does not affect thread priority and hence does not cause the degradation in performance Hash65536-64 2.81GB/s ±10% 16.69GB/s ± 0% +494.44% Fixes #57741 Change-Id: Ib912e3716c6afd277994d6c1c5b2891f82225d50 Reviewed-on: https://go-review.googlesource.com/c/go/+/461597 Reviewed-by: Benny Siegert <bsiegert@gmail.com> Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com> Auto-Submit: Benny Siegert <bsiegert@gmail.com> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
2023-01-13Revert "internal/fsys: follow root symlink in fsys.Walk"Bryan Mills
This reverts CL 448360 and adds a regression test for #57754. Reason for revert: broke 'go list' in Debian's distribution of the Go toolchain Fixes #57754. Updates #50807. Change-Id: I3e8b9126294c55f21572774b549fb28f29eded0f Reviewed-on: https://go-review.googlesource.com/c/go/+/461959 Reviewed-by: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Bryan Mills <bcmills@google.com> Run-TryBot: Bryan Mills <bcmills@google.com>
2023-01-13doc/go1.20: mention build speed improvementsAustin Clements
For #49569. For #54202. Change-Id: Iac45338bc4e45617e8ac7425076cf4cd0af157a4 Reviewed-on: https://go-review.googlesource.com/c/go/+/461957 TryBot-Bypass: Austin Clements <austin@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
2023-01-13cmd/cover: remove go.mod from testdata subdirThan McIntosh
Remove a superfluous go.mod file in one of the testdata subdirs; test runs ok without it, no need for it to be there (can confuse tooling). Change-Id: I3c43dd8ca557fdd32ce2f84cdb2427326a2dd35e Reviewed-on: https://go-review.googlesource.com/c/go/+/461945 Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Than McIntosh <thanm@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2023-01-12[release-branch.go1.20] go1.20rc3go1.20rc3Gopher Robot
Change-Id: I87007947c075e8b90dd74bdf164b59e81487f6de Reviewed-on: https://go-review.googlesource.com/c/go/+/461836 Reviewed-by: Heschi Kreinick <heschi@google.com> Auto-Submit: Gopher Robot <gobot@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Carlos Amedee <carlos@golang.org> Run-TryBot: Gopher Robot <gobot@golang.org>
2023-01-11[release-branch.go1.20] all: merge master (245e95d) into release-branch.go1.20Carlos Amedee
Merge List: + 2023-01-11 245e95dfab go/types, types2: don't look up fields or methods when expecting a type + 2023-01-11 18625d9bec runtime: fix incorrect comment + 2023-01-11 6ad27161f8 cmd/compile: better error message for when a type is in a constraint but not the type set + 2023-01-10 76d39ae349 cmd/link, runtime: Apple libc atfork workaround take 3 + 2023-01-10 0a0de0fc42 runtime: revert use of __fork to work around Apple atfork bugs + 2023-01-10 82f09b75ca os/exec: avoid leaking an exec.Cmd in TestWaitInterrupt + 2023-01-09 0202ad0b3a cmd/compile: prevent IsNewObject from taking quadratic time + 2023-01-09 64519baf38 cmd/compile/internal/pgo: add hint to missing start_line error + 2023-01-09 376076f3c6 runtime: skip TestCgoPprofCallback in short mode, don't run in parallel + 2023-01-09 0bbd67e52f runtime/pprof: document possibility of empty stacks + 2023-01-09 d9f23cfe78 runtime/pprof: improve output of TestLabelSystemstack + 2023-01-09 8232a09e3e sync/atomic: fix the note of atomic.Store + 2023-01-09 841c3eb166 all: fix typos in go file comments + 2023-01-06 f721fa3be9 syscall: skip TestUseCgroupFD if cgroupfs not mounted + 2023-01-06 76ec919237 net: fix typo in hosts.go + 2023-01-06 660d4815ea cmd/compile: describe how Go maps to wasm implementation + 2023-01-05 119f679a3b crypto/tls: fix typo in cacheEntry godoc + 2023-01-05 d50ea217f6 cmd/cover: fix problems with "go test -covermode=atomic sync/atomic" + 2023-01-04 bae7d772e8 doc/go1.20: fix links to new strings functions + 2023-01-04 4e7c838483 crypto/internal/boring: add dev.boringcrypto README.md text + 2023-01-04 46e3d9d12a cmd/compile: use "satisfies" (not "implements") for constraint errors + 2023-01-04 79cdecc852 cmd/gofmt: fix a typo in a comment + 2023-01-03 9955a7e9bb README.vendor: minor updates + 2023-01-03 d03231d9ce doc/go1.20: fix http.ResponseController example + 2023-01-03 cdc73f0679 .github: suggest using private browsing in pkgsite template Change-Id: I73be496aa4163ad1d3a6cc8114f1a612968d4b10
2023-01-11go/types, types2: don't look up fields or methods when expecting a typeRobert Findley
As we have seen many times, the type checker must be careful to avoid accessing named type information before the type is fully set up. We need a more systematic solution to this problem, but for now avoid one case that causes a crash: checking a selector expression on an incomplete type when a type expression is expected. For golang/go#57522 Change-Id: I7ed31b859cca263276e3a0647d1f1b49670023a9 Reviewed-on: https://go-review.googlesource.com/c/go/+/461577 Run-TryBot: Robert Findley <rfindley@google.com> Auto-Submit: Robert Findley <rfindley@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@google.com>
2023-01-11runtime: fix incorrect commentzhengchaopu
Fix incorrect comment for the runtime package. Change-Id: Iab889eff0e9c622afbed959d32b8b5f0ed0bfebf GitHub-Last-Rev: e9587868db36d9dd466f52f7ffc5de09947a6b2f GitHub-Pull-Request: golang/go#57731 Reviewed-on: https://go-review.googlesource.com/c/go/+/461498 Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Keith Randall <khr@golang.org> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Keith Randall <khr@google.com>
2023-01-11cmd/compile: better error message for when a type is in a constraint but not ↵Robert Griesemer
the type set While at it, also remove the word "constraint" in the detail explanation of an unsatisfied constraint. Fixes #57500. Change-Id: I55dae1694de2cfdb434aeba9d4a3530af7aca8f5 Reviewed-on: https://go-review.googlesource.com/c/go/+/460455 Reviewed-by: Robert Findley <rfindley@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Robert Griesemer <gri@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@google.com>
2023-01-10cmd/link, runtime: Apple libc atfork workaround take 3Russ Cox
CL 451735 worked around bugs in Apple's atfork handlers by calling notify_is_valid_token and xpc_atfork_child at startup, so that init code that wouldn't be safe in the child process would be warmed up in the parent process instead, but xpc_atfork_child broke use of the xpc library in Go programs, and xpc is internally used by various macOS frameworks (#57263). CL 459175 reverted that change, and then CL 459176 tried a new approach: use __fork, which doesn't call any of the atfork handlers at all. That worked, but an Apple engineer reviewing the change in private email suggests that since __fork is not public API, it should be avoided. The same engineer (with access to the source code for the xpc library) suggests that the breakage in #57263 is caused by xpc_atfork_child marking the library as unusable, expecting an imminent call to exec, and that calling xpc_date_create_from_current instead would do the necessary initialization without marking xpc as unusable. CL 460475 reverted that change, to prepare for this one. This CL goes back to the original “call functions to warm things up” approach, replacing xpc_atfork_child with xpc_date_create_from_current. The CL also updates cmd/link to use OS and SDK version 10.13.0 for x86 macOS binaries, up from 10.9.0, also suggested by the Apple engineer. Combined with the two warmup calls, this makes the fork hangs go away. The minimum macOS version has been 10.13 High Sierra since Go 1.17, so there should be no problem with writing that in the binaries too. Fixes #33565. Fixes #56784. Fixes #57263. Fixes #57577. Change-Id: I20769d9daa1fe9ea930f8009481335f8a14dc21b Reviewed-on: https://go-review.googlesource.com/c/go/+/460476 Auto-Submit: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
2023-01-10runtime: revert use of __fork to work around Apple atfork bugsRuss Cox
An Apple engineer suggests that since __fork is not public API, it would be better to use a different fix. With the benefit of source code, they suggest using xpc_date_create_from_current instead of xpc_atfork_child. The latter sets some flags that disable certain functionality for the remainder of the process lifetime (expecting exec), while the former should do the necessary setup. Reverting the __fork fix in order to prepare a clean fix based on CL 451735 using xpc_date_create_from_current. This reverts commit c61d322d5f9e3fcffa4c523892af432dca030c12. Change-Id: I2da293ff537237ffd2d40ad756d827c95c84635b Reviewed-on: https://go-review.googlesource.com/c/go/+/460475 Auto-Submit: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
2023-01-10os/exec: avoid leaking an exec.Cmd in TestWaitInterruptBryan C. Mills
In CL 436655 I added a GODEBUG setting to this test process to verify that Wait is eventually called for every exec.Cmd before it becomes unreachable. However, the cmdHang test helpers in TestWaitInterrupt/Exit-hang and TestWaitInterrupt/SIGKILL-hang intentially leak a subprocess in order to simulate a leaky third-party program, as Go users might encounter in practical use. To avoid tripping over the leak check, we call Wait on the leaked subprocess in a background goroutine. Since we expect the process running cmdHang to exit before its subprocess does, the call to Wait should have no effect beyond suppressing the leak check. Fixes #57596. Updates #52580. Updates #50436. Change-Id: Ia4b88ea47fc6b605c27ca6d9d7669c874867a900 Reviewed-on: https://go-review.googlesource.com/c/go/+/460998 Run-TryBot: Bryan Mills <bcmills@google.com> Auto-Submit: Bryan Mills <bcmills@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2023-01-09cmd/compile: prevent IsNewObject from taking quadratic timeKeith Randall
As part of IsNewObject, we need to go from the SelectN[0] use of a call to the SelectN[1] use of a call. The current code does this by just looking through the block. If the block is very large, this ends up taking quadratic time. Instead, prepopulate a map from call -> SelectN[1] user of that call. That lets us find the SelectN[1] user in constant time. Fixes #57657 Change-Id: Ie2e0b660af5c080314f4f17ba2838510a1147f9e Reviewed-on: https://go-review.googlesource.com/c/go/+/461080 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
2023-01-09cmd/compile/internal/pgo: add hint to missing start_line errorMichael Pratt
Profiles only began adding Function.start_line in 1.20. If it is missing, add a hint to the error message that they may need to profile a build of the application built with a newer version of the toolchain. Technically profiles are not required to come from Go itself (e.g., they could be converted from perf), but in practice they most likely are. Fixes #57674. Change-Id: I87eca126d3fed0cff94bbb8dd748bd4652f88b12 Reviewed-on: https://go-review.googlesource.com/c/go/+/461195 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Michael Pratt <mpratt@google.com>
2023-01-09runtime: skip TestCgoPprofCallback in short mode, don't run in parallelIan Lance Taylor
Fixes #54778 Change-Id: If9aef0c06b993ef2aedbeea9452297ee9f11fa06 Reviewed-on: https://go-review.googlesource.com/c/go/+/460461 Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com>
2023-01-09runtime/pprof: document possibility of empty stacksAustin Clements
I spent quite a while determining the cause of empty stacks in profiles and reasoning out why this is okay. There isn't a great place to record this knowledge, but a documentation comment on appendLocsForStack is better than nothing. Updates #51550. Change-Id: I2eefc6ea31f1af885885c3d96199319f45edb4ce Reviewed-on: https://go-review.googlesource.com/c/go/+/460695 Reviewed-by: Felix Geisendörfer <felix.geisendoerfer@datadoghq.com> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com>
2023-01-09runtime/pprof: improve output of TestLabelSystemstackAustin Clements
The current output of TestLabelSystemstack is a bit cryptic. This CL improves various messages and hopefully simplifies the logic in the test. Simplifying the logic leads to three changes in possible outcomes, which I verified by running the logic before and after this change through all 2^4 possibilities (https://go.dev/play/p/bnfb-OQCT4j): 1. If a sample both must be labeled and must not be labeled, the test now reports that explicitly rather than giving other confusing output. 2. If a sample must not be labeled but is, the current logic will print two identical error messages. The new logic prints only one. 3. If the test finds no frames at all that it recognizes, but the sample is labeled, it will currently print a confusing "Sample labeled got true want false" message. The new logic prints nothing. We've seen this triggered by empty stacks in profiles. Fixes #51550. This bug was caused by case 3 above, where it was triggered by a profile label on an empty stack. It's valid for empty stacks to appear in a profile if we sample a goroutine just as it's exiting (and that goroutine may have a profile label), so the test shouldn't fail in this case. Change-Id: I1593ec4ac33eced5bb89572a3ba7623e56f2fb3d Reviewed-on: https://go-review.googlesource.com/c/go/+/460516 Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: Felix Geisendörfer <felix.geisendoerfer@datadoghq.com> Reviewed-by: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2023-01-09sync/atomic: fix the note of atomic.Storecsuzhang
Change-Id: Id485d0f1e06febe97d1a770bc26c138d9613a7dd GitHub-Last-Rev: e57dd3e1abb58031b3d8bec8beace1560faad397 GitHub-Pull-Request: golang/go#57679 Reviewed-on: https://go-review.googlesource.com/c/go/+/461076 Reviewed-by: Keith Randall <khr@google.com> Auto-Submit: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Keith Randall <khr@golang.org>
2023-01-09all: fix typos in go file commentsMarcel Meyer
These typos were found by executing grep, aspell, sort, and uniq in a pipe and searching the resulting list manually for possible typos. grep -r --include '*.go' -E '^// .*$' . | aspell list | sort | uniq Change-Id: I56281eda3b178968fbf104de1f71316c1feac64f GitHub-Last-Rev: e91c7cee340fadfa32b0c1773e4e5cd1ca567638 GitHub-Pull-Request: golang/go#57669 Reviewed-on: https://go-review.googlesource.com/c/go/+/460767 Run-TryBot: Ian Lance Taylor <iant@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
2023-01-06syscall: skip TestUseCgroupFD if cgroupfs not mountedShengjing Zhu
When building in schroot (for building Debian package), the cgroupfs is not mounted in schroot (only sysfs is mounted). Change-Id: Ieddac7b2f334d58d832f5d84d81af812badf3720 Reviewed-on: https://go-review.googlesource.com/c/go/+/460539 TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com>
2023-01-06net: fix typo in hosts.goIkko Eltociear Ashimine
cannonical -> canonical Change-Id: I656ea210d8ef6eaa85245cb8f463f6b4fd67e1a2 GitHub-Last-Rev: 5a93045add2f2a6885b46377c784f665ab465cfd GitHub-Pull-Request: golang/go#57633 Reviewed-on: https://go-review.googlesource.com/c/go/+/460756 Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Damien Neil <dneil@google.com>
2023-01-06cmd/compile: describe how Go maps to wasm implementationKeith Randall
Change-Id: Ie4d8e1ae9c4c6046d27a27a61ef1147bc0ff373c Reviewed-on: https://go-review.googlesource.com/c/go/+/455715 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Keith Randall <khr@google.com> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Richard Musiol <neelance@gmail.com> Reviewed-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
2023-01-05crypto/tls: fix typo in cacheEntry godocTobias Klauser
Change-Id: Idcea184a5b0c205efd3c91c60b5d954424f37679 Reviewed-on: https://go-review.googlesource.com/c/go/+/460540 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Filippo Valsorda <filippo@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
2023-01-05cmd/cover: fix problems with "go test -covermode=atomic sync/atomic"Than McIntosh
This patch fixes an elderly bug with "go test -covermode=atomic sync/atomic". Change the cover tool to avoid adding an import of sync/atomic when processing "sync/atomic" itself in atomic mode; instead make direct calls to AddUint32/StoreUint32. In addition, change the go command to avoid injecting an artificial import of "sync/atomic" for sync/atomic itself. Fixes #57445. Change-Id: I8c8fbd0bcf26c8a8607d4806046f826296508c74 Reviewed-on: https://go-review.googlesource.com/c/go/+/459335 Run-TryBot: Than McIntosh <thanm@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2023-01-04doc/go1.20: fix links to new strings functionsPiers
Links under strings package were linking to the bytes versions of the functions. Change-Id: If6ebe37fede8e417f8683695783aa767bc01e9c7 GitHub-Last-Rev: 8849285122cb58c17b5979144649075861d8a134 GitHub-Pull-Request: golang/go#57579 Reviewed-on: https://go-review.googlesource.com/c/go/+/460458 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
2023-01-04crypto/internal/boring: add dev.boringcrypto README.md textRuss Cox
Add the text from dev.boringcrypto's README making clear what this code is and that it is unsupported. Change-Id: Ie49e8ccff10436f5d27ed422f159b4899193c9a5 Reviewed-on: https://go-review.googlesource.com/c/go/+/460515 Reviewed-by: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Run-TryBot: Russ Cox <rsc@golang.org>
2023-01-04cmd/compile: use "satisfies" (not "implements") for constraint errorsRobert Griesemer
Per the latest spec, we distinguish between interface implementation and constraint satisfaction. Use the verb "satisfy" when reporting an error about failing constraint satisfaction. This CL only changes error messages. It has no impact on correct code. Fixes #57564. Change-Id: I6dfb3b2093c2e04fe5566628315fb5f6bd709f17 Reviewed-on: https://go-review.googlesource.com/c/go/+/460396 Reviewed-by: Robert Griesemer <gri@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Robert Griesemer <gri@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
2023-01-04cmd/gofmt: fix a typo in a commentRoland Illig
Change-Id: I34b2b9f9b70e39c872d5edbbda4de0fe330211f5 GitHub-Last-Rev: 723e36e11ee011c54d3ffc8125d0477c8eed25a0 GitHub-Pull-Request: golang/go#57566 Reviewed-on: https://go-review.googlesource.com/c/go/+/460457 TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
2023-01-04[release-branch.go1.20] go1.20rc2go1.20rc2Gopher Robot
Change-Id: Ieb30cc96008bd705677e44983c68d4581706cc05 Reviewed-on: https://go-review.googlesource.com/c/go/+/460498 Auto-Submit: Gopher Robot <gobot@golang.org> Run-TryBot: Gopher Robot <gobot@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2023-01-03README.vendor: minor updatesIan Lance Taylor
Change-Id: Iaacc96e6302833019ebf7a82d5a1ae49f6ff1955 Reviewed-on: https://go-review.googlesource.com/c/go/+/460175 Run-TryBot: Ian Lance Taylor <iant@golang.org> Auto-Submit: Ian Lance Taylor <iant@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>