aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-12-07[release-branch.go1.20] go1.20rc1go1.20rc1Gopher Robot
Change-Id: I26470f8bcd902f9e1c7877763e360cb3c6255f3a Reviewed-on: https://go-review.googlesource.com/c/go/+/456096 Reviewed-by: Heschi Kreinick <heschi@google.com> Run-TryBot: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com> TryBot-Bypass: Michael Pratt <mpratt@google.com> Auto-Submit: Gopher Robot <gobot@golang.org>
2022-12-07[release-branch.go1.20] update codereview.cfg for release-branch.go1.20Michael Pratt
Following go.dev/cl/334376. Change-Id: I96be6379566b5bcc31e41bdd5f30946b06001153 Reviewed-on: https://go-review.googlesource.com/c/go/+/455896 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Michael Pratt <mpratt@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com>
2022-12-07api: promote next to go1.20Michael Pratt
Change-Id: I180f262837b164095f9ac9459d900ec1ac0585a3 Reviewed-on: https://go-review.googlesource.com/c/go/+/455697 Reviewed-by: Jenny Rakoczy <jenny@golang.org> Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-12-07doc/go1.20: delete remaining TODOMichael Pratt
This section is complete. For #54202. Change-Id: I304cc55a5b8ed53e8b8dff73a5feb5ef39207846 Reviewed-on: https://go-review.googlesource.com/c/go/+/455895 Run-TryBot: Michael Pratt <mpratt@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-12-07doc/go1.20: add section on coverageThan McIntosh
Add some basic material on the changes to code coverage testing to the release notes. For #54202. Change-Id: I28200d43b4952ce8e8ecf46c8fe8e97c81d245e5 Reviewed-on: https://go-review.googlesource.com/c/go/+/453857 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Than McIntosh <thanm@google.com> Reviewed-by: Eli Bendersky <eliben@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
2022-12-07os/user: fix buffer retry loop on macOSRuss Cox
getpwnam_r and friends return the errno as the result, not in the global errno. The code changes in CL 449316 inadvertently started using the global errno. So if a lookup didn't fit in the first buffer size, it was treated as not found instead of growing the buffer. Fixes #56942. Change-Id: Ic5904fbeb31161bccd858e5adb987e919fb3e9d9 Reviewed-on: https://go-review.googlesource.com/c/go/+/455815 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Auto-Submit: Russ Cox <rsc@golang.org>
2022-12-07doc/go1.20: relnote and take care of TODOsRuss Cox
The main change here is documenting the last-minute addition types.Satisfies. Change-Id: I8be2d2ad730ba108706bd849b68cbd1f4d68a4b8 Reviewed-on: https://go-review.googlesource.com/c/go/+/455698 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com>
2022-12-07go/internal/gcimporter: simplify unified IR importerMatthew Dempsky
CL 424854 changed the unified IR writer's handling of type declarations to write the underlying type rather than the RHS type expression's type. This in turn allows us to simplify the go/types importer, because now there's no need to delay caling SetUnderlying. Fixes #57015. Change-Id: I80caa61f6cad5b7f9d829939db733a66cfca621c Reviewed-on: https://go-review.googlesource.com/c/go/+/424876 Reviewed-by: Robert Griesemer <gri@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
2022-12-07cmd/compile: restore test/nested.go test casesMatthew Dempsky
[Re-land of CL 424854, which was reverted as CL 425214.] When handling a type declaration like: ``` type B A ``` unified IR has been writing out that B's underlying type is A, rather than the underlying type of A. This is a bit awkward to implement and adds complexity to importers, who need to handle resolving the underlying type themselves. But it was necessary to handle when A was declared like: ``` //go:notinheap type A int ``` Because we expected A's not-in-heap'ness to be conferred to B, which required knowing that A was on the path from B to its actual underlying type int. However, since #46731 was accepted, we no longer need to support this case. Instead we can write out B's actual underlying type. One stumbling point though is the existing code for exporting interfaces doesn't work for the underlying type of `comparable`, which is now needed to implement `type C comparable`. As a bit of a hack, we we instead export its underlying type as `interface{ comparable }`. Fixes #54512. Change-Id: I9aa087e0a277527003195ebc7f4fbba6922e788c Reviewed-on: https://go-review.googlesource.com/c/go/+/455279 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@google.com>
2022-12-07all: update vendored golang.org/x/netDamien Neil
Pull in HTTP/2 security fix: 1e63c2f08a http2: limit canonical header cache by bytes, not entries Fixes #56350 Change-Id: Ib14024ed894ba266f05d4a6e8c454234a45677d2 Reviewed-on: https://go-review.googlesource.com/c/go/+/455717 Run-TryBot: Damien Neil <dneil@google.com> Reviewed-by: Jenny Rakoczy <jenny@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-12-07lib/time: update to 2022g/2022gRuss Cox
Commit generated by update.bash. For #22487. Change-Id: I6a995a3baea7c511b9bd5155f81d8b8e2cdff09d Reviewed-on: https://go-review.googlesource.com/c/go/+/455356 Reviewed-by: Heschi Kreinick <heschi@google.com> Run-TryBot: Russ Cox <rsc@golang.org> Auto-Submit: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-12-06os, net/http: avoid escapes from os.DirFS and http.Dir on WindowsDamien Neil
Do not permit access to Windows reserved device names (NUL, COM1, etc.) via os.DirFS and http.Dir filesystems. Avoid escapes from os.DirFS(`\`) on Windows. DirFS would join the the root to the relative path with a path separator, making os.DirFS(`\`).Open(`/foo/bar`) open the path `\\foo\bar`, which is a UNC name. Not only does this not open the intended file, but permits reference to any file on the system rather than only files on the current drive. Make os.DirFS("") invalid, with all file access failing. Previously, a root of "" was interpreted as "/", which is surprising and probably unintentional. Fixes CVE-2022-41720 Fixes #56694 Change-Id: I275b5fa391e6ad7404309ea98ccc97405942e0f0 Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1663834 Reviewed-by: Tatiana Bradley <tatianabradley@google.com> Reviewed-by: Julie Qiu <julieqiu@google.com> Reviewed-on: https://go-review.googlesource.com/c/go/+/455362 Reviewed-by: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Jenny Rakoczy <jenny@golang.org> Reviewed-on: https://go-review.googlesource.com/c/go/+/455716 Reviewed-by: Jenny Rakoczy <jenny@golang.org> Run-TryBot: Damien Neil <dneil@google.com>
2022-12-06Revert "runtime/pprof: unskip TestTimeVDSO on Android"Cherry Mui
This reverts CL 455358, commit 98da0fb43fb481a25b3b4399cd9f517fe94d9f3f. Reason for revert: still failing https://build.golang.org/log/c9f13a76069f523b5b4a37a75ec52b30a1f3427a Change-Id: I8246d233c4fb86781b882f19dea82065cc21bc26 Reviewed-on: https://go-review.googlesource.com/c/go/+/455696 Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com>
2022-12-06cmd/go: unskip TestScript/build_issue48319 on WindowsBryan C. Mills
Now that we have newer C compilers on the Windows builders, they should fully support reproducible builds. Updates #35006. Change-Id: I0a8995fe327067c9e73e5578c385ea01ae5dee5d Reviewed-on: https://go-review.googlesource.com/c/go/+/454504 Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Bryan Mills <bcmills@google.com>
2022-12-06archive/zip: only consider UncompressedSize when checking dirsRoland Shoemaker
CL 454475 switched from checking CompressedSize to UncompressedSize when determining if we should consider an archive malformed because it contains data and added a test for an example of this (a JAR). We should also remove the hasDataDescriptor check, since that is basically an alias for CompressedSize > 0. The test didn't catch this because we didn't actually attempt to read from the returned reader. Change-Id: Ibc4c1aa9c3a733f3ebf4a956d1e2f8f4900a29cd Reviewed-on: https://go-review.googlesource.com/c/go/+/455523 Run-TryBot: Roland Shoemaker <roland@golang.org> Reviewed-by: Julie Qiu <julieqiu@google.com> Auto-Submit: Roland Shoemaker <roland@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-12-06run.bash, cmd/dist: document GO_TEST_SHORT and GO_TEST_TIMEOUT_SCALEDmitri Shuralyov
These environment variables affect cmd/dist, and in turn run.bash. They exist primarily for the Go build system, but are still needed sometimes when investigating problems. Document them in one place. Fixes #46054. Change-Id: I5dea2ac79b0d203d2f3c9ec2980382f62bead5cd Reviewed-on: https://go-review.googlesource.com/c/go/+/455517 Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
2022-12-06go/types, types2: better error message for invalid method expressionRobert Griesemer
Fixes #53358. Change-Id: I38528da1596b6e1aaedcab89b1513fb8acac596c Reviewed-on: https://go-review.googlesource.com/c/go/+/455335 Reviewed-by: Robert Findley <rfindley@google.com> Auto-Submit: Robert Griesemer <gri@google.com> Run-TryBot: Robert Griesemer <gri@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@google.com>
2022-12-06runtime/pprof: unskip TestTimeVDSO on AndroidCherry Mui
It is possible that CL 455166 fixes this. Try unskipping the test and see. If it fails again we can skip it again. Fixes #48655. Change-Id: Ia81b06cb7608f74adb276bc018e8fc840285bc11 Reviewed-on: https://go-review.googlesource.com/c/go/+/455358 Reviewed-by: Michael Pratt <mpratt@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-12-06cmd/link: pass -Wl,--no-insert-timestamp to external linker on windowsThan McIntosh
Pass -Wl,--no-insert-timestamp to the external linker on windows, so as to suppress generation of the PE file header data/time stamp. This is in order to make it possible to get reproducible CGO builds on windows (note that we already zero the timestamp field in question for internal linkage). Updates #35006. Change-Id: I3d69cf1fd32e099bd9bb4b0431a4c5f43e4b08f3 Reviewed-on: https://go-review.googlesource.com/c/go/+/455535 Run-TryBot: Than McIntosh <thanm@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-12-06cmd/compile: turn off jump tables when spectre retpolines are onKeith Randall
Fixes #57097 Change-Id: I6ab659abbca1ae0ac8710674d39aec116fab0baa Reviewed-on: https://go-review.googlesource.com/c/go/+/455336 Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Keith Randall <khr@golang.org>
2022-12-05cmd/asm: improve assembler error messagesKeith Randall
Provide file/line numbers for errors when we have them. Make the assembler error text closer to the equivalent errors from the compiler. Abort further processing when we come across errors. Fixes #53994 Change-Id: I4d6a037d6d713c1329923fce4c1189b5609f3660 Reviewed-on: https://go-review.googlesource.com/c/go/+/455276 Reviewed-by: Keith Randall <khr@google.com> Run-TryBot: Keith Randall <khr@google.com> Auto-Submit: Keith Randall <khr@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-12-05go/types, types2: better error message for failing constraint type inferenceRobert Griesemer
We know the type argument against which constraint type inference fails: print the type argument instead of the corresponding type parameter. Fixes #57096. Change-Id: Ia1da9c87fac6f8062e4d534b82e895fa4617fddc Reviewed-on: https://go-review.googlesource.com/c/go/+/455278 Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Run-TryBot: Robert Griesemer <gri@google.com> Reviewed-by: Robert Findley <rfindley@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-12-05cmd/compile: clean up amd64 opcode commentsKeith Randall
Put comments about what operations do per block of related opcodes instead of on each line. This is less repetitive and lets us be a bit more verbose in our descriptions. Doesn't change the generated code at all. Change-Id: I98fbd4029df6537b10aac2113a00df121d0fca1b Reviewed-on: https://go-review.googlesource.com/c/go/+/433736 Auto-Submit: Keith Randall <khr@google.com> Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Keith Randall <khr@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@google.com>
2022-12-05runtime: prioritize VDSO and libcall unwinding in profilerCherry Mui
In the profiler, when unwinding the stack, we have special handling for VDSO calls. Currently, the special handling is only used when the normal unwinding fails. If the signal lands in the function that makes the VDSO call (e.g. nanotime1) and after the stack switch, the normal unwinding doesn't fail but gets a stack trace with exactly one frame (the nanotime1 frame). The stack trace stops because of the stack switch. This 1-frame stack trace is not as helpful. Instead, if vdsoSP is set, we know we are in VDSO call or right before or after it, so use vdsoPC and vdsoSP for unwinding. Do the same for libcall. Also remove _TraceTrap for VDSO unwinding, as vdsoPC and vdsoSP correspond to a call, not an interrupted instruction. Fixes #56574. Change-Id: I799aa7644d0c1e2715ab038a9eef49481dd3a7f5 Reviewed-on: https://go-review.googlesource.com/c/go/+/455166 Run-TryBot: Cherry Mui <cherryyz@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-12-05net: support context cancellation in resSearchMateusz Poliwczak
As with all the stuff that call cgo from net package. Change-Id: I7c42ae44a1d47f4f949b203682217498fcdba92a GitHub-Last-Rev: 70406493bbbe10bf556a17e453623d3decf00822 GitHub-Pull-Request: golang/go#57043 Reviewed-on: https://go-review.googlesource.com/c/go/+/454697 Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-12-05doc: 1.20 compiler changesDavid Chase
This adds the nonPGO, non-coverage compiler changes for the 1.20 release. There's not that much user visible change. For #54202. Change-Id: Ib2964ed5f7e73bb89c720d09b868ab79682f5070 Reviewed-on: https://go-review.googlesource.com/c/go/+/454536 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: David Chase <drchase@google.com>
2022-12-05runtime/cgo: fix typo in gcc_loong64.SCherry Mui
Fix typo in CL 454838. Change-Id: I0e91d22cf09949f0bf924ebcf09f1ddac525bac4 Reviewed-on: https://go-review.googlesource.com/c/go/+/455161 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2022-12-05runtime/cgo: add .file directive to GNU assembly filesCherry Mui
Without it, at least on ARM64 with older BFD linker, it will include the file of the object file (which is of a temporary path) as a debug symbol into the binary, causing the build to be nondeterministic. Adding a .file directive makes it to create a STT_FILE symbol with deterministic input, and prevent the linker creating one using the temporary object file path. Fixes #57035. Change-Id: I3ab716b240f60f7a891af2f7e10b467df67d1f31 Reviewed-on: https://go-review.googlesource.com/c/go/+/454838 Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Cherry Mui <cherryyz@google.com>
2022-12-03all: fix some comments for methodcui fliter
Change-Id: I4cff6b2a1fed6acdf754539c3c53a61eaa3b3f84 Reviewed-on: https://go-review.googlesource.com/c/go/+/450176 Auto-Submit: Ian Lance Taylor <iant@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-12-02runtime/debug: add missing periodRuss Cox
Pointed out in review of CL 453602, but it looks like I forgot to re-upload before submitting. Change-Id: I8f4fac52ea0f904f6f9b06e13fc8ed2e778f2360 Reviewed-on: https://go-review.googlesource.com/c/go/+/454835 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Auto-Submit: Russ Cox <rsc@golang.org> Reviewed-by: Julie Qiu <julieqiu@google.com>
2022-12-02doc/go1.20: preannounce dropping macOS 10.13 and 10.14 supportHeschi Kreinick
For #23011. Change-Id: I386920928a98403180098f1da5ea7696a239210e Reviewed-on: https://go-review.googlesource.com/c/go/+/454957 Auto-Submit: Heschi Kreinick <heschi@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Heschi Kreinick <heschi@google.com>
2022-12-02cmd/go: remove TestScript/version_buildvcs_git_gpgBryan C. Mills
This was a regression test added for a 'git' command line used for build stamping. Unfortunately, 'gpg' has proved to be extremely fragile: * In recent versions, it appears to always require 'gpg-agent' to be installed for anything involving secret keys, but for some reason is not normally marked as requiring gpg-agent in Debian's package manager. * It tries to create a Unix domain socket in a subdirectory of $TMPDIR without checking the path length, which fails when $TMPDIR is too long to fit in the 'sun_path' field of a sockaddr_un struct (which typically tops out somewhere between 92 and 108 bytes). We could theoretically address those by artificially reducing the script's TMPDIR length and checking for gpg-agent in addition to gpg, but arguably those should both be fixed upstream instead. On balance, the incremental value that this test provides does not seem worth the complexity of dealing with such a fragile third-party tool. Updates #50675. Updates #48802. Fixes #57034. Change-Id: Ia3288c2f84f8db86ddfa139b4d1c0112d67079ef Reviewed-on: https://go-review.googlesource.com/c/go/+/454502 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Bryan Mills <bcmills@google.com> Auto-Submit: Bryan Mills <bcmills@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
2022-12-02cmd/go: skip TestScript/mod_replace_gopkginBryan C. Mills
(Until it can be made hermetic.) The gopkg.in service has had a lot of flakiness lately. Go users in general are isolated from that flakiness by the Go module mirror (proxy.golang.org), but this test intentionally bypasses the module mirror because the mirror itself uses cmd/go to download the module. In the long term, we can redirect the gopkg.in URL to the local (in-process) vcweb server added for #27494. In the meantime, let's skip the test to reduce the impact of upstream outages. For #54503. Change-Id: Icf3de7ca416db548e53864a71776fe22b444fcea Reviewed-on: https://go-review.googlesource.com/c/go/+/454503 Run-TryBot: Bryan Mills <bcmills@google.com> Auto-Submit: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com>
2022-12-02path/filepath: make Join("c:", "/a") return "c:/a" againDamien Neil
Historically, on Windows filepath.Join("c:", elt) does not insert a path separator between "c:" and elt, but preserves leading slashes in elt. Restore this behavior, which was inadvertently changed by CL 444280. Fixes #56988 Change-Id: Id728bf311f4093264f8c067d8b801ea9ebef5b5f Reviewed-on: https://go-review.googlesource.com/c/go/+/453497 Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Bryan Mills <bcmills@google.com> Reviewed-by: Roland Shoemaker <roland@golang.org> Run-TryBot: Damien Neil <dneil@google.com>
2022-12-02go/internal/gcimporter: in short tests, avoid creating export data for all ↵Bryan C. Mills
of std gcimporter.TestImportTypeparamTests still needs to create full export data because it loads lots of source files from GOROOT/test that expect to be able to import arbitrary subsets of the standard library, so we now skip it in short mode. On a clean build cache, this reduces 'go test -short cmd/compile/internal/importer go/internal/gcimporter' on my machine from 21–28s per test to <6s per test. Updates #56967. Updates #47257. Change-Id: I8fd80293ab135e0d2d213529b74e0ca6429cdfc7 Reviewed-on: https://go-review.googlesource.com/c/go/+/454498 Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Bryan Mills <bcmills@google.com> Reviewed-by: Michael Matloob <matloob@golang.org>
2022-12-02doc/go1.20: resolve root bundle package TODORoland Shoemaker
We're unlikely to get this package out of the door all that soon. For now add a note that SetFallbackRoots will be most commonly used with an TBA package, and link the tracking issue. We could also just remove the "It will most commonly be used ..." sentence. Change-Id: Ie96134d757f5b4c69f1878d53c92b5ed602671e4 Reviewed-on: https://go-review.googlesource.com/c/go/+/454056 Reviewed-by: Julie Qiu <julieqiu@google.com> Run-TryBot: Roland Shoemaker <roland@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Roland Shoemaker <roland@golang.org>
2022-12-02math/big: fix BitLen performance regressionFilippo Valsorda
CL 450055 replaced BitLen with a slower constant-time implementation, which caused a performance regression in some ecosystem benchmarks. https://perf.golang.org/search?q=upload%3A20221130.13+pkg%3Agithub.com%2Fericlagergren%2Fdecimal%2Fbenchmarks Current tip vs this CL name old time/op new time/op delta Pi/foo=ericlagergren_(Go)/prec=100-4 151µs ± 0% 129µs ± 0% -14.89% (p=0.000 n=10+9) Pi/foo=ericlagergren_(GDA)/prec=100-4 305µs ± 0% 269µs ± 1% -11.88% (p=0.000 n=9+10) Pi/foo=cockroachdb/apd/prec=100-4 5.74ms ± 0% 5.33ms ± 0% -7.02% (p=0.000 n=9+10) Pi/foo=shopspring/prec=100-4 265µs ±16% 268µs ±11% ~ (p=0.796 n=10+10) Pi/foo=apmckinlay/prec=100-4 3.10µs ± 0% 3.08µs ± 0% -0.60% (p=0.000 n=8+10) Pi/foo=go-inf/prec=100-4 132µs ± 9% 137µs ± 9% ~ (p=0.182 n=10+9) Pi/foo=float64/prec=100-4 4.97µs ± 0% 4.98µs ± 0% ~ (p=0.196 n=10+10) CL 450055's parent vs this CL name old time/op new time/op delta Pi/foo=ericlagergren_(Go)/prec=100-4 129µs ± 1% 129µs ± 0% ~ (p=0.182 n=10+9) Pi/foo=ericlagergren_(GDA)/prec=100-4 267µs ± 1% 269µs ± 1% +0.93% (p=0.001 n=9+10) Pi/foo=shopspring/prec=100-4 252µs ± 9% 268µs ±11% ~ (p=0.052 n=10+10) Pi/foo=apmckinlay/prec=100-4 3.10µs ± 1% 3.08µs ± 0% -0.66% (p=0.000 n=9+10) Pi/foo=go-inf/prec=100-4 135µs ± 6% 137µs ± 9% ~ (p=0.605 n=9+9) Pi/foo=float64/prec=100-4 4.97µs ± 0% 4.98µs ± 0% +0.23% (p=0.005 n=8+10) goos: linux goarch: amd64 pkg: github.com/ericlagergren/decimal_benchmarks cpu: Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz Fixes #57014 Change-Id: I08478bea122212320a592ad2652e33077807de09 Reviewed-on: https://go-review.googlesource.com/c/go/+/454617 Reviewed-by: Roland Shoemaker <roland@golang.org> Run-TryBot: Filippo Valsorda <filippo@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Auto-Submit: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-12-02cmd/api: track darwin arm64 portRuss Cox
The darwin arm64 port was added in Go 1.16 and is a first-class port, so it should be tracked by cmd/api. This CL does that, backfilling API files as needed. It also removes a spurious cgo.Incomplete API feature. Change-Id: Idd995677915e81bf1c2e09be65b31e084b75f668 Reviewed-on: https://go-review.googlesource.com/c/go/+/453260 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-12-02encoding/csv: use proper doc comment for Deprecated notesRuss Cox
End-of-line comments are not doc comments, so Deprecated notes in them are not recognized as deprecation notices. Rewrite the comments. Change-Id: I275fa9aec403132fda45853e52daa22bc06fcd36 Reviewed-on: https://go-review.googlesource.com/c/go/+/453617 Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Joseph Tsai <joetsai@digital-static.net> Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-12-02archive/zip: use proper doc comment for Deprecated notesRuss Cox
End-of-line comments are not doc comments, so Deprecated notes in them are not recognized as deprecation notices. Rewrite the comments. Change-Id: Idc4681924f9a7e9ead62f672ef8a763e70db1f0f Reviewed-on: https://go-review.googlesource.com/c/go/+/453616 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Joseph Tsai <joetsai@digital-static.net> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Russ Cox <rsc@golang.org> Auto-Submit: Russ Cox <rsc@golang.org>
2022-12-02archive/tar: use proper doc comment for Deprecated notesRuss Cox
End-of-line comments are not doc comments, so Deprecated notes in them are not recognized as deprecation notices. Rewrite the comments. Change-Id: Idb19603d7fc2ec8e3a2f74bacb74fbbec5583d20 Reviewed-on: https://go-review.googlesource.com/c/go/+/453615 TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Joseph Tsai <joetsai@digital-static.net> Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-12-02cmd/api: track deprecationsRuss Cox
Deprecating an API creates notices that go out to potentially millions of Go developers encouraging them to update their code. The choice to deprecate an API is as important as the choice to add a new API. We should track those and make them explicit. This will also ensure that deprecations go through proposal review. Change-Id: Ide9f60c32e5a88fb133e0dfedd984b8b0f70f510 Reviewed-on: https://go-review.googlesource.com/c/go/+/453259 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Auto-Submit: Russ Cox <rsc@golang.org> Reviewed-by: David Chase <drchase@google.com>
2022-12-02runtime/debug: more complete BuildInfo documentationRuss Cox
A potential user did not realize Deps included all transitive dependencies, not just direct dependencies of the main module. Clarify that and add various other useful information. Change-Id: I5b8e1314bb26092edbcc090ba8eb9859f0a70662 Reviewed-on: https://go-review.googlesource.com/c/go/+/453602 Run-TryBot: Russ Cox <rsc@golang.org> Auto-Submit: Russ Cox <rsc@golang.org> Reviewed-by: Julie Qiu <julieqiu@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com>
2022-12-01go/internal/gcimporter: load cached export data for packages individuallyBryan C. Mills
Previously, we were using internal/goroot.PkgfileMap to locate cached export data. However, PkgfileMap regenerates export data for the entire standard library, whereas gcimporter may only need a single package. Under the new approach, we load the export data (still using 'go list -export') for each GOROOT package individually, avoiding work to rebuild export data for packages that are not needed. This is a tradeoff: if most packages in GOROOT are actually needed, we end up making many more calls to 'go list', and may build packages sequentially instead of in parallel (but with lower latency to start using the export data from the earlier packages). On my workstation, starting from a clean cache for each run, this reduces the wall time of 'go test go/internal/gcimporter -run=TestImportedTypes' from 22s real time (2m10s user time) to 6s real (27s user), and only increases 'go test go/internal/gcimporter' from 28s real (2m16s user) to 30s real (2m19s user). Updates #56967. Updates #47257. Change-Id: I22556acdd9b1acc56533ed4c2728ea29b585c073 Reviewed-on: https://go-review.googlesource.com/c/go/+/454497 Reviewed-by: Michael Matloob <matloob@golang.org> Auto-Submit: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Bryan Mills <bcmills@google.com>
2022-12-01cmd/dist: remove pkg/$GOOS_$GOARCH and pkg/obj at exitMichael Matloob
pkg/obj will be empty, so just remove it. pkg/$GOOS_$GOARCH will be empty unless the user has specified GODEBUG=installgoroot=all, so check if it's empty, and if so, delete it. Also remove xreaddirfiles, which is unused. Also remove the copy of pkg/$GOOS_$GOARCH in the cmd/go test TestNewReleaseRebuildsStalePackagesInGOPATH. The directory is empty so copying it has no effect. For #47257 Change-Id: Ief90b882d157bd16078cd5d2b83a915bfc831f9a Reviewed-on: https://go-review.googlesource.com/c/go/+/453496 Run-TryBot: Michael Matloob <matloob@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com>
2022-12-01doc/go1.20: add code tags in crypto/{rsa,subtle} and net/netip sectionsTobias Klauser
Change-Id: I516195fb1c2434feb3bf130d37012a98d77beeb6 Reviewed-on: https://go-review.googlesource.com/c/go/+/454235 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Russ Cox <rsc@golang.org> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-12-01net: acquire thread in resSearchMateusz Poliwczak
Change-Id: I042906d8eee8defafbd98f671fd30c2a68281705 GitHub-Last-Rev: 0660c9a989600eeb8652d1228777488d28397731 GitHub-Pull-Request: golang/go#57021 Reviewed-on: https://go-review.googlesource.com/c/go/+/454396 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
2022-12-01net: retry with bigger buffer in resSearchMateusz Poliwczak
Glibc returns size > bufSize, when the entire dns reply does not fit inside the provided buffer. Change-Id: Ie1c1c6a3411880bd8bdb4371f1f1b7bcce837ea2 GitHub-Last-Rev: 488cd3ed0db2a86433aa921117b8f1e9192b1fa5 GitHub-Pull-Request: golang/go#57020 Reviewed-on: https://go-review.googlesource.com/c/go/+/454395 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com>
2022-12-01crypto/des: fix a typo in the comment for permuteFinalBlockChaoshuai Lü
The comment copy pasted from the permuteInitialBlock and should be fixed. Change-Id: I101f1deceadf9b0480e5b679e4e237bda601950b GitHub-Last-Rev: 7662df772e4ac171c79467678861ac4d7547da78 GitHub-Pull-Request: golang/go#56982 Reviewed-on: https://go-review.googlesource.com/c/go/+/453995 TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Russ Cox <rsc@golang.org>
2022-12-01doc: add release note for cgo.IncompleteCuong Manh Le
Updates #46731 Change-Id: Ie64e87d759c48642582342d221b24f77bb81d47a Reviewed-on: https://go-review.googlesource.com/c/go/+/453556 Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>