aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-06-09cmd/cgo: recognize clang 14 DWARF type namesgo1.19beta1Dmitri Goutnik
Fixes #53013 Change-Id: I169d4eb2420a6da52cc9abe17da98c3092a91be6 Reviewed-on: https://go-review.googlesource.com/c/go/+/407514 Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-06-09runtime/cgo: retry _beginthread on EACCESMichael Pratt
We occassionally see _beginthread failing with EACCES, meaning "insufficient resources" according to the Microsoft documentation. Exactly which resources is unclear. Similar to pthread_create on unix systems, we can wait a bit and retry to try to get success. The alternative is to abort, so we may as well give it a try. Fixes #52572. Change-Id: I6e05add53b4ae36c61e53b1ee3fed6bc74e17dfa Reviewed-on: https://go-review.googlesource.com/c/go/+/410355 Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-06-09runtime/cgo: merge bodies of cgo_sys_thread_start on windowsMichael Pratt
The bodies of cgo_sys_thread_start (and x_cgo_sys_thread_create) are nearly identical on all of the windows ports. Create a single _cgo_beginthread implementation that contains the body and is used on all ports. This will reduce churn in an upcoming CL to add retry logic. We could theoretically have a single implementation of _cgo_sys_thread_start shared by all ports, but I keep them separate for ease of searching. Right now every single port implements this function in their gcc_GOOS_GOARCH.c file, so it is nice to keep this symmetry. _cgo_dummy_export must move out of libcgo_windows.h because it is a definition and the inclusion of libcgo_windows.h in multiple files creates duplicate definitions. For #52572. Change-Id: I9fa22009389349c754210274c7db2631b061f9c7 Reviewed-on: https://go-review.googlesource.com/c/go/+/410354 Run-TryBot: Michael Pratt <mpratt@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-06-09api: promote next to go1.19Cherry Mui
Change-Id: I3d80f0691b399fe4ee4a0d161b5cee907ae6b94f Reviewed-on: https://go-review.googlesource.com/c/go/+/411394 Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-06-09go/types, types2: only set instance context if packages matchRobert Findley
In CL 404885, we avoid infinite expansion of type instances by sharing a context between the expanding type and new instances created during expansion. This ensures that we do not create an infinite number of identical but distinct instances in the presence of reference cycles. This pins additional memory to the new instance, but no more (approximately) than would be pinned by the original expanding instance. However, we can do better: since type cycles are only possible within a single package, we only need to share the local context if the two types are in the same package. This reduces the scope of the shared local context, and in particular can avoid pinning the package of the expanding type to the package of the newly created instance. Updates #52728 Change-Id: Iad2c85f4ecf60125f1da0ba22a7fdec7423e0338 Reviewed-on: https://go-review.googlesource.com/c/go/+/410416 Run-TryBot: Robert Findley <rfindley@google.com> Reviewed-by: Robert Griesemer <gri@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-06-08cmd/go/testdata/script: fix skip on list_replace_absolute_windowsMichael Matloob
The test should skip if it's not on windows *or* it's a short test, but instead is now skipping if it's not on windows *and* it's a short test, causing it to be run on non-windows longtest builders. Change-Id: Ica011bab632b713b0564fefabd5b42878d401844 Reviewed-on: https://go-review.googlesource.com/c/go/+/411122 Reviewed-by: Heschi Kreinick <heschi@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Michael Matloob <matloob@golang.org> Auto-Submit: Michael Matloob <matloob@golang.org>
2022-06-08api/next: minor reformatCherry Mui
Add newline endings to files without them. Delete empty lines. So it is consistent and easier to put them together. Change-Id: I84e6b7a1fe59e9f4d7f00f61539f6449f19a5d40 Reviewed-on: https://go-review.googlesource.com/c/go/+/411121 Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-06-08runtime: use pidleget for faketime jumpMichael Pratt
In faketime mode, checkdead is responsible for jumping time forward to the next timer expiration, and waking an M to handle the newly ready timer. Currently it pulls the exact P that owns the next timer off of the pidle list. In theory this is efficient because that P is immediately eligible to run the timer without stealing. Unfortunately it is also fraught with peril because we are skipping all of the bookkeeping in pidleget: * Skipped updates to timerpMask mean that our timers may not be eligible for stealing, as they should be. * Skipped updates to idlepMask mean that our runq may not be eligible for stealing, as they should be. * Skipped updates to sched.npidle may break tracking of spinning Ms, potentially resulting in lost work. * Finally, as of CL 410122, skipped updates to p.limiterEvent may affect the GC limiter, or cause a fatal throw when another event occurs. The last case has finally undercovered this issue since it quickly results in a hard crash. We could add all of these updates into checkdead, but it is much more maintainable to keep this logic in one place and use pidleget here like everywhere else in the runtime. This means we probably won't wake the P owning the timer, meaning that the P will need to steal the timer, which is less efficient, but faketime is not a performance-sensitive build mode. Note that the M will automatically make itself a spinning M to make it eligible to steal since it is the only one running. Fixes #53294 For #52890 Change-Id: I4acc3d259b9b4d7dc02608581c8b4fd259f272e9 Reviewed-on: https://go-review.googlesource.com/c/go/+/411119 Run-TryBot: Michael Pratt <mpratt@google.com> Auto-Submit: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com>
2022-06-08cmd/go: clean paths before using them form index functionsMichael Matloob
We use str.TrimFilePathPrefix to trim the module root prefix and get the relative path of each package in the module when scanning the module and in the RelPath function. Make sure to clean the path before indexing and in RelPath to ensure that each path starts with that prefix, because walk will clean the root path before joining each subdirectory path to it. Change-Id: I1dc1eddbd42030eb6d5d8e76a8675f94216447c3 Reviewed-on: https://go-review.googlesource.com/c/go/+/411118 Run-TryBot: Michael Matloob <matloob@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org>
2022-06-08syscall: remove unused setgroups on linux/loong64Tobias Klauser
Setgroups in syscall_linux.go already wraps the setgroups(2) syscall with correct POSIX semantics (ref. CL 210639). Change-Id: I961cd7c7fce1d70d23bf13cc82cad17854bbf40e Reviewed-on: https://go-review.googlesource.com/c/go/+/411214 Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
2022-06-08runtime: skip TestGdbBacktrace on gdb bugAustin Clements
Very rarely, GDB will successfully run the whole test and the inferior will exit successfully, and then GDB itself hangs and never exits. Detect this and skip the test as flaky. We could just continue the test since all of the output we need is there, but by skipping it we're less likely to notice serious regressions in this test. Fixes #37405. Change-Id: I016cbb06f48673f064733da3e3f1ddcbefd58159 Reviewed-on: https://go-review.googlesource.com/c/go/+/411117 Reviewed-by: Cherry Mui <cherryyz@google.com>
2022-06-08net: fix testHookDialTCP raceDamien Neil
CL 410754 introduces a race accessing the global testHookDialTCP hook. Avoiding this race is difficult, since Dial can return while goroutines it starts are still running. Add a version of this hook to sysDialer, so it can be set on a per-test basis. (Perhaps other uses of this hook should be moved to use the sysDialer-local hook, but this change fixes the immediate data race.) For #52173. Change-Id: I8fb9be13957e91f92919cae7be213c38ad2af75a Reviewed-on: https://go-review.googlesource.com/c/go/+/410957 Run-TryBot: Damien Neil <dneil@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-06-08cmd/go: enable module index by defaultMichael Matloob
This changes the module index to be enabled by default, rather than disabled by default. The index can still be disabled by setting GODEBUG=index=0. Fixes #53290. Change-Id: Ic3728fc69d96bb6ef56b56e8c9f2dce35f2923cc Reviewed-on: https://go-review.googlesource.com/c/go/+/410821 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2022-06-08cmd/go: properly call PackageModuleRoot to get modroot for indexMichael Matloob
PackageModuleRoot needs to be called with the package's path, not its directory on disk. Change-Id: I080fe8ce2aeb72e1466624db81595a00915606bb Reviewed-on: https://go-review.googlesource.com/c/go/+/410820 Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Michael Matloob <matloob@golang.org>
2022-06-08cmd/go: set Root and target fields for packages in GOPATHMichael Matloob
This change replicates the behavior filed in issue #37015 for packages imported from the module index. That behavior is that packages that happen to exist in a GOPATH src directory have p.Root and p.Target set even when the packages are loaded from modules. This is likely unintentional behavior because in module mode, packages shouldn't behave differently depending on whether their directories exist in GOPATH. But for uniformity, (and because two of our tests depend on this behavior), this CL will implement this behavior. We can remove it from the module index when we remove it from the go/build logic. Change-Id: I3f501c92fbb76eaf86b6b9275539f2129b67f884 Reviewed-on: https://go-review.googlesource.com/c/go/+/410822 Reviewed-by: Michael Matloob <matloob@golang.org> Run-TryBot: Michael Matloob <matloob@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
2022-06-08doc/go1.19: delete remaining TODOsRuss Cox
The crypto ones were done in a separate CL and didn't merge well. Same for runtime/debug. The others are stale. For #51400. Change-Id: Iadb4de94d21cd6a20f52277a1c3d7800a729b81e Reviewed-on: https://go-review.googlesource.com/c/go/+/411115 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
2022-06-08runtime: gofmtMichael Pratt
libfuzzerHookStrCmp is manually reformatted into a proper go doc list. We don't always format testdata, but these test programs are standard Go programs that can be formatted. Change-Id: I4dde398bca225ae8c72e787e4d43fd0ccfd0a90b Reviewed-on: https://go-review.googlesource.com/c/go/+/411114 Auto-Submit: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Michael Pratt <mpratt@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
2022-06-08doc/go1.19: complete most remaining TODOsRuss Cox
The ones I left behind are almost entirely ones that I see pending CLs for. Also make various fixes to existing text. For #51400. Change-Id: I555e0074c9df82b5bdb345e21a08c8757ca147b4 Reviewed-on: https://go-review.googlesource.com/c/go/+/410814 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
2022-06-08runtime: remove unused pipe and setNonblock on linux/loong64Tobias Klauser
CL 389354 removed the fallback to pipe on all platforms with pipe2. This is the case for linux. Thus, pipe and setNonblock are no longer needed on linux/loong64 too. Change-Id: I089adf918d0fd8de5d4d61a893707a2660f89183 Reviewed-on: https://go-review.googlesource.com/c/go/+/410736 Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-06-08doc/go1.19: mention riscv64 supported regabiMeng Zhuo
Change-Id: I715e53e4baf67f896fa9c240f7668ce11f7b33c3 Reviewed-on: https://go-review.googlesource.com/c/go/+/409195 Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Russ Cox <rsc@golang.org>
2022-06-07os: document that Chdir affects fs.FS returned by DirFS with a relative pathDan Kortschak
Fixes #47214. Change-Id: I6fdc1c4340c0943b825ac22e311179ad1cf30915 Reviewed-on: https://go-review.googlesource.com/c/go/+/410334 Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
2022-06-07syscall: remove unused accept on linux/loong64Tobias Klauser
accept is no longer used on Linux since CL 346849 changed Accept to use accept4 only. This follows CL 386415 which already removed accept on all other Linux platforms before the linux/loong64 port was submitted. For #45964 Change-Id: I26945ff780e71174a0b0c2f5313c4bc1e1cbf786 Reviewed-on: https://go-review.googlesource.com/c/go/+/410737 Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-06-07net: use synthetic network in TestDialParallelDamien Neil
TestDialParallel is testing the Happy Eyeballs algorithm implementation, which dials IPv4 and IPv6 addresses in parallel with the preferred address family getting a head start. This test doesn't care about the actual network operations, just the handling of the parallel connections. Use testHookDialTCP to replace socket creation with a function that returns successfully, with an error, or after context cancellation as required. Limit tests of elapsed times to a check that the fallback deadline has been exceeded in cases where this is expected. This should fix persistent test flakiness. Fixes #52173. Change-Id: Ic93f270fccb63b24a91105a4d541479fc33a2de4 Reviewed-on: https://go-review.googlesource.com/c/go/+/410754 Auto-Submit: Damien Neil <dneil@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Damien Neil <dneil@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-06-07doc/go1.19: document that the assembler requires -pCherry Mui
For #51400. Change-Id: I50fb4313105ae6dbbbe2c98cbe4a8f8e2563eba9 Reviewed-on: https://go-review.googlesource.com/c/go/+/410824 Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-06-07doc/go1.19: document linker CL that switches DWARF compressed section formatCherry Mui
For #51400. Updates #50796. Change-Id: Ica6c700a5b54e4712b09c43d1d7a9c3bba408b8b Reviewed-on: https://go-review.googlesource.com/c/go/+/410823 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Fangrui Song <maskray@google.com>
2022-06-07go/types, types2: better error message for invalid use of constraint typeRobert Griesemer
Fixes #42881. Change-Id: If800c5f90c0034d192bf8b6649e5cfda96df48cb Reviewed-on: https://go-review.googlesource.com/c/go/+/410954 Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Robert Findley <rfindley@google.com>
2022-06-07go/types, types2: better error message if type is not in type setRobert Griesemer
Fixes #40350. Change-Id: Ia654d6b854971700ca618692a864265557122b23 Reviewed-on: https://go-review.googlesource.com/c/go/+/410876 Reviewed-by: Robert Findley <rfindley@google.com> Reviewed-by: Robert Griesemer <gri@google.com>
2022-06-07go/types, types2: use | rather than ∪ when printing term listsRobert Griesemer
With this change, the termlist String() function prints termlists in the usual Go notation and thus we can use it in error reporting. Preparation for fixing #40350. For #40350. Change-Id: Ia28318841305de234a71af3146ce0c59f5e601a5 Reviewed-on: https://go-review.googlesource.com/c/go/+/410894 Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Robert Findley <rfindley@google.com>
2022-06-07doc/go1.19: add release notes for net/http and net/urlDamien Neil
For #51400 Change-Id: I6412132db79074eef7d2cb3d66456c48b0d745a3 Reviewed-on: https://go-review.googlesource.com/c/go/+/408877 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Damien Neil <dneil@google.com> Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Carlos Amedee <carlos@golang.org>
2022-06-07doc/go1.19: adjust runtime release notesMichael Pratt
This addresses comments from CL 410356. For #48409. For #51400. Change-Id: I03560e820a06c0745700ac997b02d13bc03adfc6 Reviewed-on: https://go-review.googlesource.com/c/go/+/410735 Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Chris Hines <chris.cs.guy@gmail.com> Reviewed-by: Russ Cox <rsc@golang.org>
2022-06-07runtime: document GOMEMLIMIT in environment variables sectionMichael Pratt
For #48409. Change-Id: Ia6616a377bc4c871b7ffba6f5a59792a09b64809 Reviewed-on: https://go-review.googlesource.com/c/go/+/410734 Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Chris Hines <chris.cs.guy@gmail.com> Reviewed-by: Russ Cox <rsc@golang.org>
2022-06-07doc/go1.19: document loong64 portDavid Chase
Updates #46229 For #51400 Change-Id: Iedd5d3c4cd656b59ba2e1fe813851830849a8614 Reviewed-on: https://go-review.googlesource.com/c/go/+/410816 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: David Chase <drchase@google.com> Reviewed-by: Austin Clements <austin@google.com>
2022-06-07sync/atomic: clarify that 8-byte alignment of variables is due to escapeWill Hawkins
For #53223. Change-Id: I79e9b920488581a4d850e4051ee0dd600b5bbcb1 Reviewed-on: https://go-review.googlesource.com/c/go/+/410102 Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Austin Clements <austin@google.com>
2022-06-07doc/go1.19: some platforms are still on TSAN v2Austin Clements
For #51400 Change-Id: Ie6d6ac773aa81b105e15ef7399374f574197d775 Reviewed-on: https://go-review.googlesource.com/c/go/+/410817 Reviewed-by: Cherry Mui <cherryyz@google.com>
2022-06-07doc/go1.19: compiler section is complete, modulo TODOsAustin Clements
For #51400 Change-Id: I964e52e0a36e7bbe77175670e93ce8c99e7dab6d Reviewed-on: https://go-review.googlesource.com/c/go/+/410367 Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
2022-06-07doc/go1.19: minor editsAustin Clements
For #51400 Change-Id: I57565c1d79e0c5487d39d46f556b247d35f05d3c Reviewed-on: https://go-review.googlesource.com/c/go/+/410674 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Keith Randall <khr@golang.org>
2022-06-07doc/go1.19: complete TODOs for go/typesRobert Findley
Fill in the details of outstanding TODO items for go/types changes. For #51400 Change-Id: Ib40d75fa1018aa164022cb49b293795dd597d49d Reviewed-on: https://go-review.googlesource.com/c/go/+/410815 Run-TryBot: Robert Findley <rfindley@google.com> Reviewed-by: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@google.com>
2022-06-07doc/go1.19: add various crypto release notesRoland Shoemaker
For #51400 Change-Id: I908f53a54c6603e1bf2c9238cd51cf5c4a24407b Reviewed-on: https://go-review.googlesource.com/c/go/+/410295 Reviewed-by: Russ Cox <rsc@golang.org> Auto-Submit: Roland Shoemaker <roland@golang.org> Run-TryBot: Roland Shoemaker <roland@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Tatiana Bradley <tatiana@golang.org>
2022-06-07runtime: fix inline assembly trampoline for arm64Khaled Yakdan
Use the program counter to compute the address of the first instruction of the ret sled. The ret sled is located after 5 instructions from the MOVD instruction saving the value of the program counter. Change-Id: Ie7ae7a0807785d6fea035cf7a770dba7f37de0ec GitHub-Last-Rev: 2719208c6a3b049e0f394e5311ce3282b58f8516 GitHub-Pull-Request: golang/go#53039 Reviewed-on: https://go-review.googlesource.com/c/go/+/407895 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Alan Donovan <adonovan@google.com>
2022-06-07cmd/link: specify -Wl,-z params as documentedMotiejus Jakštys
Both GNU and LLVM linkers de facto accept `-zPARAM`, and Go sometimes does it. Inconsistently: there are more uses of `-z PARAM` than `-zPARAM`: $ git grep -E -- '-Wl,-z[^,]' master | wc -l 4 $ git grep -E -- '-Wl,-z,' master | wc -l 7 However, not adding a space between `-z` and the param is not documented: llvm-13: $ man ld.lld-13 | grep -E -A1 -w -- "^ +-z" -z option Linker option extensions. gnu ld: $ man ld | grep -E -A1 -w -- "^ +-z" -z keyword The recognized keywords are: -- -z defs Report unresolved symbol references from regular object files. This is done even if the linker is creating a non-symbolic -- -z muldefs Normally when a symbol is defined multiple times, the linker will report a fatal error. These options allow multiple definitions -- -z --imagic ... and thus should be avoided. `zig cc`, when used as the C compiler (`CC="zig cc" go build ...`), will bark, because `zig cc` accepts only `-z PARAM`, as documented. Closes ziglang/zig#11669 Change-Id: I758054ecaa3ce01a72600bf65d7f7b5c3ec46d09 GitHub-Last-Rev: e068e007da9f2b0441ee0aa8b198a7ba3cd93ed3 GitHub-Pull-Request: golang/go#53030 Reviewed-on: https://go-review.googlesource.com/c/go/+/407834 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com>
2022-06-07doc/go1.19: delete boringcrypto TODORuss Cox
Boringcrypto has never been officially supported and it remains unsupported. It need not be mentioned in the release notes. Change-Id: I24a08d424982615244d51c1d250035d85a602023 Reviewed-on: https://go-review.googlesource.com/c/go/+/410362 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com>
2022-06-07doc/go1.19: add more TODOs from updated relnoteRuss Cox
CL 410244 changes relnote to look for api file changes as well as references to proposal issues, finding various things that were missing from the release notes. This CL adds the TODOs that the updated relnote found. For #51400. Change-Id: I512a9b8f1349a6c68c8a6979f55a07964d630175 Reviewed-on: https://go-review.googlesource.com/c/go/+/410361 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com>
2022-06-06doc/go1.19: add release notes for the soft memory limit and idle GCMichael Anthony Knyszek
This change resolves some TODOs in the release notes, and while we're here, also clarifies how CPU profile samples are represented in runtime traces. Change-Id: Idaa36ccf65b03fd5463b2d5da682d3fa578d2f46 Reviewed-on: https://go-review.googlesource.com/c/go/+/410356 Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Austin Clements <austin@google.com>
2022-06-06runtime, sync, sync/atomic: document happens-before guaranteesRuss Cox
A few of these are copied from the memory model doc. Many are entirely new, following discussion on #47141. See https://research.swtch.com/gomm for background. The rule we are establishing is that each type that is meant to help synchronize a Go program should document its happens-before guarantees. For #50859. Change-Id: I947c40639b263abe67499fa74f68711a97873a39 Reviewed-on: https://go-review.googlesource.com/c/go/+/381316 Auto-Submit: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Roland Shoemaker <roland@golang.org>
2022-06-06go/doc/comment: add heuristics for common badly formatted commentsRuss Cox
In a set of 55M Go doc comments drawn from the latest version of all public Go modules known to the module proxy in spring 2020, the current Go 1.19 gofmt reformats about 1.57M of them. Out of those 1.57M comments, inspection of random samples shows that around 5% of the changed comments contain unindented code snippets, multiline shell commands, or lists. For example: // Here is a greeting: // // func main() { // fmt.Println("hello, world") // } // Run this command: // // path/to/your/program -flag1=longargument1 \ // -flag2=longargument2 \ // -flag3 // There are three possibilities: // // - Unindented code snippets (or JSON objects) // in which the first and last line are unindented // but end in { and start with }, respectively. // - Unindented multiline shell commands // in which the lines end in \ // - Unindented lists, in which wrapped lines are indented. All three of these cases involve unindented lines next to indented lines that would according to the usual rules begin a pre block. Before this CL, they'd be reformatted to: // Here is a greeting: // // func main() { // // fmt.Println("hello, world") // // } // Run this command: // // path/to/your/program -flag1=longargument1 \ // // -flag2=longargument2 \ // -flag3 // There are three possibilities: // // - Unindented code snippets (or JSON objects) // // in which the first and last line are unindented // but end in { and start with }, respectively. // // - Unindented multiline shell commands // // in which the lines end in \ // // - Unindented lists, in which wrapped lines are indented. The fact that they are not already in canonical format gives us a signal that they might not mean what the usual rules would say. This CL takes advantage of that opening to apply a few heuristics to better handle these cases: 1. If an indented code block immediately follows (without a blank line) an unindented line ending in { or \, include the unindented line in the code block. 2. If an indented code block immediately precedes (without a blank line) an unindented line beginning with }, include the unindented line in the code block. 3. If an indented line immediately follows (without a blank line) an unindented line that starts with a list marker, assume this is an unindented list with a wrapped indented line, and treat all adjacent unindented lines starting with list markers as part of the list, stopping at any surrounding blank lines. This raises the fraction of “correctly” reformatted doc comments in the corpus from approximately 87% to approximately 93%. Change-Id: I7ac542eb085032d607a7caf3ba9020787b2978b5 Reviewed-on: https://go-review.googlesource.com/c/go/+/410360 Auto-Submit: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Roland Shoemaker <roland@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-06-06doc/go_mem: update revision dateRuss Cox
CL 381315 added major revisions but neglected to update the date. For #50859. Change-Id: I086a55f0c80579c479bca5268109c9f3ae680adf Reviewed-on: https://go-review.googlesource.com/c/go/+/410675 Reviewed-by: Roland Shoemaker <roland@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Auto-Submit: Russ Cox <rsc@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com>
2022-06-06doc/go1.19: gc requires -p=importpathAustin Clements
For #51400 Change-Id: I07a805147a6aa0923331f3f940a9e6e5553cbea9 Reviewed-on: https://go-review.googlesource.com/c/go/+/410676 Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2022-06-06doc/go1.19: document Resolver.PreferGoBrad Fitzpatrick
Updates #51400 Change-Id: I61733574362d4cf3cb65122bd13361e5c0f6728c Reviewed-on: https://go-review.googlesource.com/c/go/+/410375 Run-TryBot: Heschi Kreinick <heschi@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com> Run-TryBot: Michael Pratt <mpratt@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com> Auto-Submit: Michael Pratt <mpratt@google.com>
2022-06-06cmd/go: use index to match packages in dependency modulesMichael Matloob
If we're trying to search in a module in the module cache, instead iterate over the packages in the index. Change-Id: Ia94cbe6e9690110c28b93dbb33810680e3010381 Reviewed-on: https://go-review.googlesource.com/c/go/+/403756 Reviewed-by: Michael Matloob <matloob@golang.org> Reviewed-by: Peter Weinberger <pjw@google.com> Run-TryBot: Michael Matloob <matloob@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-06-06all: boringcrypto post-merge cleanupRuss Cox
This CL addresses the comments on CL 403154. For #51940. Change-Id: I99bb3530916d469077bfbd53095bfcd1d2aa82ef Reviewed-on: https://go-review.googlesource.com/c/go/+/403976 Reviewed-by: Roland Shoemaker <roland@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>