1
0
mirror of https://github.com/golang/go synced 2024-11-22 20:04:47 -07:00
Commit Graph

60234 Commits

Author SHA1 Message Date
qiulaidongfeng
dc3169f235 n
Change-Id: Iaaa821da8451bab91e81ea457b3ea6f32ff91823
2024-06-01 08:57:56 +08:00
qiulaidongfeng
b7431d6eeb n
Change-Id: Ibeb7ff0def24354435a3784dceb22245463a21f1
2024-06-01 08:49:04 +08:00
qiulaidongfeng
197d6e445c n
Change-Id: I04351ac442c5d5cd25ddca84ad9e76a88bb21abb
2024-05-31 16:07:48 +08:00
qiulaidongfeng
7ee45f859a n
Change-Id: Ib1a532c540c890ce988e4092699fd879baf9799f
2024-05-30 21:41:38 +08:00
qiulaidongfeng
f9ace65631 n
Change-Id: If135e6103cc0fac40a3724e2ba43a72f48c5fc9f
2024-05-30 21:38:32 +08:00
qiulaidongfeng
44f0084f54 n
Change-Id: Ie084691584b08e17944079f182cc353a98191780
2024-05-30 21:23:11 +08:00
qiulaidongfeng
d82fe30433 n
Change-Id: I3d1f59eb50c754715d333526b84f7cebee65476a
2024-05-30 21:17:50 +08:00
qiulaidongfeng
b41c326363 n
Change-Id: I22c8737d1c6201f5d1b63ff70b85b04df3863e0f
2024-05-30 21:17:50 +08:00
qiulaidongfeng
7ba34d5596 n
Change-Id: Ia5035a9e583fffee355265ee18cb10609d9c14c1
2024-05-30 21:17:50 +08:00
qiulaidongfeng
73f07ac6d3 n
Change-Id: Ia532697ea429907567ab156f6f50059a15e90fbb
2024-05-30 21:17:50 +08:00
qiulaidongfeng
ff7b0a6641 n
Change-Id: I23878885974cddceb110566020f44a776e9af2f4
2024-05-30 21:17:50 +08:00
qiulaidongfeng
078683c4cb n
Change-Id: Iaf48768865f63b9d828a2bf46478e72da65891c7
2024-05-30 21:17:50 +08:00
qiulaidongfeng
f51931d2f3 os/exec: not add a suffix to Cmd.Path
For avoid data race for cmd.Path , in CL 527820 fixed data race , but addition of suffixe as shown in #66586 was also introduced.
The result of call lookExtensions is actually the name passed to os.StartProcess,
But solutions at the time chose to reuse cmd.Path to represent the name passed to os.StartProcess,since this results in #66586,
So use new field save call lookExtensions result.

Fixes #66586

Change-Id: Ib1baa6d7803f9471af6e38bcb55f0298422e6743
2024-05-30 21:17:50 +08:00
Michael Anthony Knyszek
81d424ee9a internal/trace: fix off-by-one error in arguments for exp events
There's an off-by-one error in computing the Args field for experimental
events, resulting in confusing output. This wasn't caught because no
test actually checks to make sure the experimental arguments make sense
yet.

Change-Id: I339677a80bee6319407fced20d5e0f9c2fd235b3
Reviewed-on: https://go-review.googlesource.com/c/go/+/589055
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
2024-05-30 12:39:00 +00:00
Michael Anthony Knyszek
787414ca48 cmd/cgo/internal/swig: force use of lld for LTO tests on the builders
For whatever reason, on the builders, when using /usr/bin/ld (the
default linker) with -flto we end up with problems. Specifically, the
linker seems to require LLVMgold.so and can't find it. I'm not really
sure why, but what definitely seems to work is forcing use of lld, which
ships with our clang installation on the builders.

Just enforce this on the builders for now; I've actually had very few
problems running this locally (and I think I'm also mixing and matching
linkers and toolchains too...), so it may be related to the version of
clang we're testing with.

This change, along with CL 589295, should fully fix the clang builders.

Fixes #67698.

Change-Id: I3bfbcd609e7d0fd70e52ac7e2a0817db95664f20
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-clang15,gotip-linux-386-clang15
Reviewed-on: https://go-review.googlesource.com/c/go/+/589296
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2024-05-30 12:38:14 +00:00
Michael Anthony Knyszek
1cf862e66c cmd/cgo/internal/testsanitizers: skip some libfuzzer tests in short mode
These tests are newly-running now that we have installed a C++ toolchain
on the clang builders, but one of them doesn't actually complete in short
mode.

For #67698.

Change-Id: Id1ff4c05e380426d920277c13495f30e23561a4e
Reviewed-on: https://go-review.googlesource.com/c/go/+/589295
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2024-05-30 12:32:05 +00:00
Michael Anthony Knyszek
cad3ed207f cmd/cgo/internal/swig,cmd/go: reenable swig tests on 386
CL 588938 skipped the tests because they were broken to unblock the
builders, but we're fairly certain the reason they were failing is
because we're missing g++-multilib. This change is intended to land once
CL 589175 is deployed.

Fixes #67698.

Change-Id: I5bb679290ae9ba9ab3bda9499cdf1eec649bc066
Reviewed-on: https://go-review.googlesource.com/c/go/+/589195
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2024-05-30 04:04:13 +00:00
Michael Anthony Knyszek
fa08befb25 cmd/cgo/internal/swig,cmd/go: skip swig tests on 386
We recently added a C++ toolchain to the image, and this is causing
problems on 386 and clang builders. The likely culprit is that we're
missing 32-bit C++ libraries on the builders.

Even if this theory is wrong, these tests *never* ran (always skipped,
or truly never ran) on these platforms, so just skip them for now. We
can look into getting the libraries installed later, but skip for now
to unblock the builders.

There are also problems with clang, but I believe they'll be resolved by
setting CXX to clang++ in golangbuild.

For #67698.

Change-Id: I20fc1c5fa1285001ff86a4226771c30cf2e7f92d
Cq-Include-Trybots: luci.golang.try:gotip-linux-386-clang15,gotip-linux-386
Reviewed-on: https://go-review.googlesource.com/c/go/+/588938
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-29 19:59:15 +00:00
Russ Cox
2a7ca156b8 all: document legacy //go:linkname for final round of modules
Add linknames for most modules with ≥50 dependents.
Add linknames for a few other modules that we know
are important but are below 50.

Remove linknames from badlinkname.go that do not merit
inclusion (very small number of dependents).
We can add them back later if the need arises.

Fixes #67401. (For now.)

Change-Id: I1e49fec0292265256044d64b1841d366c4106002
Reviewed-on: https://go-review.googlesource.com/c/go/+/587756
Auto-Submit: Russ Cox <rsc@golang.org>
TryBot-Bypass: Russ Cox <rsc@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2024-05-29 17:58:53 +00:00
Russ Cox
5121b45d74 crypto/tls: add linkname comments dropped from CL 587220
A bad merge syncing before the submit of CL 587220 dropped these.
(I forgot to write the file out.)

For #67401.

Change-Id: I6f2ba69f388907f3d24eeef55c80cbb2cf51f580
Reviewed-on: https://go-review.googlesource.com/c/go/+/587755
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Marten Seemann <martenseemann@gmail.com>
2024-05-29 16:25:28 +00:00
Russ Cox
9a8995b8b6 all: document legacy //go:linkname for modules with ≥100 dependents
For #67401.

Change-Id: I015408a3f437c1733d97160ef2fb5da6d4efcc5c
Reviewed-on: https://go-review.googlesource.com/c/go/+/587598
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Russ Cox <rsc@golang.org>
2024-05-29 16:25:21 +00:00
Kir Kolyshkin
a3a584e4ab os: RemoveAll: fix symlink race for unix
Since all the platforms now support O_DIRECTORY flag for open, it can be
used to (together with O_NOFOLLOW) to ensure we open a directory, thus
eliminating the need to call stat before open. This fixes the symlink race,
when a directory is replaced by a symlink in between stat and open calls.

While at it, rename openFdAt to openDirAt, because this function is (and was)
meant for directories only.

NOTE Solaris supports O_DIRECTORY since before Solaris 11 (which is the
only version Go supports since supported version now), and Illumos
always had it. The only missing piece was O_DIRECTORY flag value, which
is taken from golang.org/x/sys/unix.

Updates #52745.

Change-Id: Ic1111d688eebc8804a87d39d3261c2a6eb33f176
Reviewed-on: https://go-review.googlesource.com/c/go/+/588495
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Aleksa Sarai <cyphar@cyphar.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2024-05-29 13:52:34 +00:00
Mauri de Souza Meneguzzo
3dcb9623df syscall: add Setuid for aix
Fixes #67651

Change-Id: I8128433ddd040c8b91d7b6264200e19433d7a7dc
GitHub-Last-Rev: 7557a88cf5
GitHub-Pull-Request: golang/go#67656
Reviewed-on: https://go-review.googlesource.com/c/go/+/588119
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Run-TryBot: Mauri de Souza Meneguzzo <mauri870@gmail.com>
TryBot-Bypass: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-05-29 13:50:55 +00:00
Mateusz Poliwczak
78eadc87df make.bash: preserve GOROOT_BOOTSTRAP
CL 582076 made the GOROOT_BOOTSTRAP set to "", which in turn
causes the next iteration to return true. "$GOROOT_BOOTSTRAP/bin/go"
becomes "/bin/go", which always exists.

Fixes #67654

Change-Id: I290bd4a7defc58e4b34d5bf955ef4f34569ff0ed
GitHub-Last-Rev: 9c7134fa44
GitHub-Pull-Request: golang/go#67655
Reviewed-on: https://go-review.googlesource.com/c/go/+/588436
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-05-29 13:48:46 +00:00
Robert Griesemer
13c49096fd go/types, types2: report error when using uninstantiated signature alias
For #67547.
Fixes #67683.

Change-Id: I9487820ab4e2bd257d253a7016df45729b29f836
Reviewed-on: https://go-review.googlesource.com/c/go/+/588855
Auto-Submit: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
2024-05-29 02:09:54 +00:00
Robert Griesemer
ee29dbe43e go/types, types2: don't lose alias information during unification
While at it, rename asTypeParam to asBoundTypeParam for clarity.

For #67547.
Fixes #67628.

Change-Id: I2f447c4cd4d72f5315fe9323d82fcb9bf33657c6
Reviewed-on: https://go-review.googlesource.com/c/go/+/588797
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2024-05-29 02:09:51 +00:00
RTann
c26be72d68 archive/zip: fix UncompressedSize godoc
Change-Id: I0c142eb18af7b03759041e894bbce0f365ea9d7e
Reviewed-on: https://go-review.googlesource.com/c/go/+/588116
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-05-28 21:41:09 +00:00
Michael Matloob
8e2b3ac705 cmd/go: add release notes for go telemetry, and telemetry env values
This change fills in the release notes for the go telemetry command as
well as the unsettable GOTELEMETRY and GOTELEMETRYDIR go env values.

For #67111

Change-Id: Id6943f79f7ab2457787e1639d8d5fb1c1e2649dc
Reviewed-on: https://go-review.googlesource.com/c/go/+/587923
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-28 19:06:07 +00:00
Michael Matloob
94aeedc33a cmd/go/internal/load: clone pgo variant's PackagePublic.Imports in split
Before this change the pgo and non-pgo variants Imports slices pointed
to the same array, so modifying the pgo variant's Imports slice to add
the .ForMain suffix modified the non-pgo vairant's Imports slice too.
This change clones the imports slice to avoid that.

Fixes #66218

Change-Id: Ic936086f2c31f2056988d6546216142e4fce4d8d
Reviewed-on: https://go-review.googlesource.com/c/go/+/588275
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
Auto-Submit: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2024-05-28 17:00:51 +00:00
Dmitri Shuralyov
377646589d text/template: clarify error when too few or too many return values
Prior to CL 561115, calling a function without any return values would
print "function called with 0 args; should be 1 or 2". Afterwards, the
error message became "too many return values".

Keep the improvement of referring to return values rather than args,
and bring back clarity about their actual and permitted numbers.

Change-Id: I2c014e4633208cc7052fac265a995a8f2fe68151
Reviewed-on: https://go-review.googlesource.com/c/go/+/588355
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-24 22:23:55 +00:00
Michael Anthony Knyszek
a2eae66c30 doc: add release notes for a couple minor tracing features
For #65614.

Change-Id: I759bf671b8f84c5224798b0dfaee6b158fdcc95a
Reviewed-on: https://go-review.googlesource.com/c/go/+/587927
Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-24 21:37:09 +00:00
Zxilly
c506f035d9 text/template: add detailed info for goodFunc check
goodFunc now returns a error describe the exact error it met.
builtin call function can print the name of the callee function
if the goodFunc check failed.

For input {{call .InvalidReturnCountFunc}}

before:
  can't evaluate field InvalidReturnTypeFunc in type *template.T
after:
  invalid function signature for .InvalidReturnTypeFunc: second argument should be error; is bool

Change-Id: I9aa53424ac9a2bffbdbeac889390f41218817575
GitHub-Last-Rev: 7c1e0dbd08
GitHub-Pull-Request: golang/go#65509
Reviewed-on: https://go-review.googlesource.com/c/go/+/561115
Reviewed-by: Rob Pike <r@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2024-05-24 21:22:24 +00:00
Michael Anthony Knyszek
b89f946c88 internal/trace: remove last references to internal/trace/v2
This change removes the last few references to internal/trace/v2.
Notably, it shows up in the generators' imports, so they'll fail to run
currently.

Change-Id: Ibc5a9c1844634ea7620558e270ca3db9921ba56e
Reviewed-on: https://go-review.googlesource.com/c/go/+/587930
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-24 21:15:28 +00:00
Kir Kolyshkin
22a80e78ea syscall: Setrlimit: always clean rlimitNofileCache
Since the introduction of origRlimitNofileCache in CL 476097 the only way to
disable restoring RLIMIT_NOFILE before calling execve syscall
(os.StartProcess etc) is this:

	var r syscall.Rlimit
	syscall.Getrlimit(syscall.RLIMIT_NOFILE, &r)
	syscall.Setrlimit(syscall.RLIMIT_NOFILE, &r)

The problem is, this only works when setrlimit syscall succeeds, which
is not possible in some scenarios.

Let's assume that if a user calls syscall.Setrlimit, they
unconditionally want to disable restoring the original rlimit.

For #66797.

Change-Id: I20d0365df4bd6a5c3cc8c22b0c0db87a25b52746
Reviewed-on: https://go-review.googlesource.com/c/go/+/588076
Run-TryBot: Kirill Kolyshkin <kolyshkin@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Bypass: Ian Lance Taylor <iant@golang.org>
2024-05-24 21:10:10 +00:00
Cherry Mui
5c7d774538 cmd/link: propagate FromAssembly attribute when cloning symbols to external
When a symbol is cloned to external (in order to edit it),
propagate the FromAssembly attribute, so the linker knows it is
(originally) an assembly symbol, and can treat it specially (e.g.
for stack maps).

This should fix the Linux/RISCV64 builder.

Change-Id: Icc956bcc43b79f328983a60835b05fd50f22326a
Reviewed-on: https://go-review.googlesource.com/c/go/+/587926
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2024-05-24 20:26:10 +00:00
Cherry Mui
23778fcb27 cmd/link: print the seed in TestRandLayout
When the test fails, print the seed, to help debug.

Change-Id: I1530ce433f3c6b573fbba061452f57c7649cad77
Reviewed-on: https://go-review.googlesource.com/c/go/+/587925
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-24 20:26:02 +00:00
Michael Anthony Knyszek
54efef99b2 iter: deflake TestPull by letting exiting goroutines finish
Currently TestPull is flaky because goroutines spawned to run subtests
exit asynchronously when they finish and TestPull has explicit checks
for the number of existing goroutines.

This is pretty much only a problem between subtests executing, because
within each subtest the coroutine goroutine spawned for iter.Pull always
exits fully synchronously before the final `next` or `stop` returns.

So, we can resolve the problem by ensuring the first goroutine count the
test takes likely doesn't contain any exiting goroutines. The trick is
to set GOMAXPROCS=1 and spin in runtime.Gosched until the number of
goroutines stabilizes to some reasonable degree (we pick 100 consecutive
iterations; there are only a handful of possible goroutines that can
run, so this is giving that handful around 20 chances to actually run to
completion).

When running TestPull under stress2, this issue is easily reproducible
before this CL. After this CL, it no longer reproduces under these
conditions.

Fixes #66017.

Change-Id: I4bf0a9771f7364df7dd58f8aeb3ae26742d5746f
Reviewed-on: https://go-review.googlesource.com/c/go/+/587917
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-24 19:15:10 +00:00
Andy Pan
1c924572d0 runtime: fix the inconsistency of kq parameter of addWakeupEvent
Change-Id: I4f1668ed9085cf19c3eff17c237601a91d0660db
Reviewed-on: https://go-review.googlesource.com/c/go/+/587876
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2024-05-24 17:15:46 +00:00
Andy Pan
7bc7039a6a syscall: prevent redundant newline from empty $extraimports
Currently mksyscall script produces one redundant newline
when $extraimports is empty, leading to a gofmt warning
reported by "git codereview change".

Change-Id: I57b0fa040347375698973e777285deded16ab62e
Reviewed-on: https://go-review.googlesource.com/c/go/+/587877
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-24 17:15:02 +00:00
qiulaidongfeng
a7f6da78d2 cmd/go: env changed flag respects $GOROOT/go.env
From $GOROOT/go.env file got GOPROXY and GOSUMDB and GOTOOLCHAIN default value.

Fixes #67542

Change-Id: I0cb2e1ab6a32963288ae463a9b0bd92ac6719447
GitHub-Last-Rev: fda9be48b9
GitHub-Pull-Request: golang/go#67564
Reviewed-on: https://go-review.googlesource.com/c/go/+/587160
Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2024-05-24 17:13:51 +00:00
kenshi kamata
85115da5d3 errors: change interface{} to any in comment
Change-Id: Ibf28c4b3026019427a2485230e14929ed80a1727
Reviewed-on: https://go-review.googlesource.com/c/go/+/587255
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2024-05-24 17:13:04 +00:00
Alan Donovan
60e6986612 .github/ISSUE_TEMPLATE/03-gopls.yml: use textarea for gopls version
The output of "gopls version" is multiple lines.

Change-Id: Ic00734b05011098d408db6f49f86c4e2c8edfa24
Reviewed-on: https://go-review.googlesource.com/c/go/+/587924
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
2024-05-24 17:09:04 +00:00
Dmitri Shuralyov
960cd14124 doc/README: suggest a way to preview next content, tweak release steps
Smaller edits are usually fine to do without previewing, since Markdown
can be intuitive. But for larger changes including re-ordering sections
and such, it can be helpful to quickly see the end result. Write down a
way to do that.

Update the release steps to capture that the doc/next content will move
to x/website before RC 1, when the complete release note draft is ready.

For #64169.

Change-Id: Ie554ed5294ce819fd0689e2249e6013826f0c71f
Reviewed-on: https://go-review.googlesource.com/c/go/+/587922
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2024-05-24 16:43:34 +00:00
Russ Cox
f85c40438f internal/runtime/exithook: make safe for concurrent os.Exit
Real programs can call os.Exit concurrently from multiple goroutines.
Make internal/runtime/exithook not crash in that case.

The throw on panic also now runs in the deferred context,
so that we will see the full stack trace that led to the panic.
That should give us more visibility into the flaky failures on
bugs #55167 and #56197 as well.

Fixes #67631.

Change-Id: Iefdf71b3a3b52a793ca88d89a9c270eb50ece094
Reviewed-on: https://go-review.googlesource.com/c/go/+/588235
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Russ Cox <rsc@golang.org>
2024-05-24 16:41:13 +00:00
Michael Matloob
378c48df3b cmd/go/internal/modload: fix bug in error message
CL 513756 moved the usage of modGo after it was set to its proper value,
so the error message text always listed the version of go as
"unspecified". Fix the error message in the case where the version was
set in the go.mod, and provide an error message where it wasn't.

Fixes #67587

Change-Id: I763f6be7ee811da32fcb7e785682fd6f48145981
Reviewed-on: https://go-review.googlesource.com/c/go/+/588075
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-24 15:54:40 +00:00
Michael Matloob
2785f4fad6 cmd/go/internal/telemetrystats: fix assignment to ok
Change-Id: I7ee6198949bd2ea7e92d3e75c94ead04c31be491
Reviewed-on: https://go-review.googlesource.com/c/go/+/588236
Auto-Submit: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2024-05-24 15:44:55 +00:00
Robert Griesemer
3ea2be1e47 go/types, types2: pull up Unalias call to cover all of cycleFinder.typ
Without a test because it's unclear the situation can actually occur,
but the code is correct because it now mimics the behavior without
explicit Alias nodes.

For #67547.

Change-Id: I21a31af28880ca6d599fe465563d9574c26ed1f1
Reviewed-on: https://go-review.googlesource.com/c/go/+/588117
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2024-05-24 13:54:20 +00:00
Kir Kolyshkin
35ef4a9f33 runtime: x_cgo_getstackbound: initialize pthread attr
In glibc versions older than 2.32 (before commit 4721f95058),
pthread_getattr_np does not always initialize the `attr` argument,
and when it fails, it results in a NULL pointer dereference in
pthread_attr_destroy down the road.

This is the simplest way to avoid this, and an alternative to CL 585019.

Updates #65625.

Change-Id: If490fd37020b03eb084ebbdbf9ae0248916426d0
Reviewed-on: https://go-review.googlesource.com/c/go/+/587919
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Cherry Mui <cherryyz@google.com>
2024-05-24 03:44:11 +00:00
Robert Griesemer
2fe2e4d593 go/types, types2: document why Unalias is not needed in some places
Documentation change only.

For #67547.

Change-Id: I0da480299c33239bcd1e059f8b9c6d48d8f26609
Reviewed-on: https://go-review.googlesource.com/c/go/+/587820
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
2024-05-23 23:17:08 +00:00
Robert Griesemer
13e3068b9c go/types, types2: add missing Unalias call to type string functionality
For #67547.

Change-Id: I999cd31f9a01f91e7984b4e7012c81e8bd9c6b06
Reviewed-on: https://go-review.googlesource.com/c/go/+/587940
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-23 21:17:10 +00:00