Replace custom basename implementations with filepathlite.Base across
all relevant os/stat files to unify path processing across platforms.
Change-Id: I7c4795661926949bae71e66d8b4f9363e7caef15
GitHub-Last-Rev: 1236e93ebc
GitHub-Pull-Request: golang/go#67195
Reviewed-on: https://go-review.googlesource.com/c/go/+/583415
Reviewed-by: Cherry Mui <cherryyz@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: Ian Lance Taylor <iant@google.com>
Change-Id: I874f0c0399cb09de4fe4dd2097602c5fa0512b12
GitHub-Last-Rev: 73be01ae2a
GitHub-Pull-Request: golang/go#67223
Reviewed-on: https://go-review.googlesource.com/c/go/+/583735
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>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Change-Id: Ifd91722fd63af89af96a90dd69c73488f7fab5d3
GitHub-Last-Rev: da03963a07
GitHub-Pull-Request: golang/go#67179
Reviewed-on: https://go-review.googlesource.com/c/go/+/583296
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reduce the telemetry proposal template to make it easier to file
telemetry proposals. At a high level, the proposal is just a request to
merge a specific configuration change, so a free text rationale as well
as proposed CL link should suffice. The proposal committee can make sure
that all concerns about new uploading are addressed.
Also, fix links to the chartconfig package documentation, as well as the
config.txt file, and reference the new go.dev/doc/telemetry.
Change-Id: I9eefba14967a18327abfcb2de427dc4bec6d659f
Reviewed-on: https://go-review.googlesource.com/c/go/+/583496
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Robert Findley <rfindley@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Uint was part of the approved proposal but was inadvertently left
out of Go 1.22. Add for Go 1.23.
Change-Id: Ifaf24447bd70c8524c2fd299eefdf4aa29e49e66
Reviewed-on: https://go-review.googlesource.com/c/go/+/583455
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Griesemer <gri@google.com>
This CL modifies the download behavior when downloading a toolchain for 1.21+. Previously, Go would attempt to download 1.X when upgrading the toolchain which would cause the download to fail for 1.21+ since 1.X is an invalid toolchain. We will attempt to download 1.X.0 since that's likely what the user intended.
Additionally, we will also now provide a better error message when the
user provides a language version instead of a toolchain version for
1.21+.
Fixes#66175Fixes#62278
Change-Id: I28f894290a19d8e3cd220e9d70aeca8f4447e5a1
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/580217
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Use abi.(*Type).IfaceIndir instead.
Change-Id: I31197cbf0edaf53bbb0455fa76d2a4a2ab40b420
GitHub-Last-Rev: 2659b696ef
GitHub-Pull-Request: golang/go#67227
Reviewed-on: https://go-review.googlesource.com/c/go/+/583755
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Use abi.(*Type).IfaceIndir instead.
Change-Id: I55a1a593d76601fb615d131abcf1b32012741e8c
GitHub-Last-Rev: 14de2a9d67
GitHub-Pull-Request: golang/go#67228
Reviewed-on: https://go-review.googlesource.com/c/go/+/583756
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
The darwin linker allows setting the LTO library with the -lto_library
flag. This wasn't caught by our "safe linker flags" check because it
was covered by the -lx flag used for linking libraries. This change
adds a specific check for excluded flags which otherwise satisfy our
existing checks.
Loading a mallicious LTO library would allow an attacker to cause the
linker to execute abritrary code when "go build" was called.
Thanks to Juho Forsén of Mattermost for reporting this issue.
Fixes#67119
Fixes CVE-2024-24787
Change-Id: I77ac8585efbdbdfd5f39c39ed623b9408a0f9eaf
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/1380
Reviewed-by: Russ Cox <rsc@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/583815
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
An identical go1.18 test exists at `src/image/png/fuzz_test.go`.
Change-Id: I3e4db46296fb6a56655f849da8c0689aa5a1c28c
Reviewed-on: https://go-review.googlesource.com/c/go/+/576795
Reviewed-by: qiu laidongfeng2 <2645477756@qq.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
The added program fails consistently with "signal handler spoils
errno" error under TSAN.
For #66427.
Change-Id: Id57b9e62aa30b273a1c793aecd86ec1f211062fc
Reviewed-on: https://go-review.googlesource.com/c/go/+/581722
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
If a signal lands on a non-Go thread, and Go code doesn't want to
handle it, currently we re-raise the signal in the signal handler
after uninstalling our handler, so the C code can handle it.
But if there is no C signal handler and the signal is ignored,
there is no need to re-raise the signal. Just ignore it. This
avoids uninstalling and reinstalling our handler, which, for some
reason, changes errno when TSAN is used. And TSAN does not like
errno being changed in the signal handler.
Not really sure if this is the bset of complete fix, but it does
fix the immediate problem, and it seems a reasonable thing to do
by itself.
Test case is CL 581722.
Fixes#66427.
Change-Id: I7a043d53059f1ff4080f4fc8ef4065d76ee7d78a
Reviewed-on: https://go-review.googlesource.com/c/go/+/582077
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This code was just missed during the cleanup. There's maybe some merit
to keeping OneNewExtraM, but it would still be fairly optimistic. It's
trivial to bring back, so delete it for now.
Change-Id: I2d033c6daae787e0e8d6b92524f3e59610e2599f
Reviewed-on: https://go-review.googlesource.com/c/go/+/583375
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
These were previously only available with GOEXPERIMENT=rangefunc.
For #61897.
Change-Id: I86aea5ae8be1f7a2975b623325811221ed40d384
Reviewed-on: https://go-review.googlesource.com/c/go/+/557836
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
This CL reduces
the go test runtime time from 130s to 59s.
Change-Id: I91babcd15723a2e7bc706e4e9bddaf3ce39d5b2f
GitHub-Last-Rev: 54c3c82269
GitHub-Pull-Request: golang/go#65765
Cq-Include-Trybots: luci.golang.try:gotip-linux-386-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/564995
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Include the OID in the error message when parsing X.509
certificates. This should ease fixing such issues, because
users can clearly identify the duplicate extension via the
reported error. Previously, this wasn't possible and
required either manually adjusting the standard library or
inspecting the certificate with various debugging tools.
Fixes#66880
Change-Id: I8c22f3a9f9c648ccff66073840830208832a3f85
GitHub-Last-Rev: b855a161d4
GitHub-Pull-Request: golang/go#67157
Reviewed-on: https://go-review.googlesource.com/c/go/+/583096
Reviewed-by: Roland Shoemaker <roland@golang.org>
Auto-Submit: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
... if the architecture can't do unaligned loads.
We already handle this in a few places, but this particular place
was added in CL 399542 and missed this additional restriction.
Fixes#67160
Change-Id: I45988f11ff3ed45df1c4da3f0931ab1fdb22dbfe
Reviewed-on: https://go-review.googlesource.com/c/go/+/583175
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Auto-Submit: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Derek Parker <parkerderek86@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Just a code cleanup.
Change-Id: Ie887ab2c71de11b4844c4e6fd4e5aca3265ac3aa
Reviewed-on: https://go-review.googlesource.com/c/go/+/583216
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>
Reviewed-by: Michael Pratt <mpratt@google.com>
Change-Id: Ie51a1550181c9478455c757fc82a88bc549ad687
GitHub-Last-Rev: 4b6ffd043b
GitHub-Pull-Request: golang/go#67153
Reviewed-on: https://go-review.googlesource.com/c/go/+/583095
Auto-Submit: Ian Lance Taylor <iant@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Change-Id: Ifa3c022ad5453301573593a3d05e7b1d42b931ff
GitHub-Last-Rev: a7468b068b
GitHub-Pull-Request: golang/go#67167
Reviewed-on: https://go-review.googlesource.com/c/go/+/583215
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
Change-Id: I82f0e7c0c0c80a3cc0e4a732a59ae1debb37d8d9
GitHub-Last-Rev: c8a081f5b3
GitHub-Pull-Request: golang/go#67166
Reviewed-on: https://go-review.googlesource.com/c/go/+/583195
Commit-Queue: Ian Lance Taylor <iant@google.com>
Reviewed-by: Keith Randall <khr@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: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Change-Id: Icb1ba7df1f0414090632e663b6a92b492546070d
GitHub-Last-Rev: 5169d26813
GitHub-Pull-Request: golang/go#67092
Reviewed-on: https://go-review.googlesource.com/c/go/+/581940
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@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: Keith Randall <khr@google.com>
OpenBSD 7.5 no longer has a syscall symbol in libc. This will
typically result in external linking failures since the syscall
package still has a reference to an undefined `syscall' symbol.
Remove these references and return ENOSYS if syscall.Syscall* or
syscall.RawSyscall* are used for a system call number that does not
currently have an internal remapping.
Fixes#63900
Change-Id: Ic757bf8872ad98a92dd5b34cf58312c32fbc9a96
Reviewed-on: https://go-review.googlesource.com/c/go/+/582257
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
OpenBSD 7.5 no longer supports indirect syscalls. A number of Go
packages make use of syscall.Syscall with SYS_IOCTL or SYS_SYSCTL,
since neither is well supported by golang.org/x/sys/unix. Reroute
calls with either of these system call numbers to the respective
libc stub so that they continue to work.
Updates #63900
Change-Id: I3323a3fa311ee9227e6220417834253763866881
Reviewed-on: https://go-review.googlesource.com/c/go/+/582256
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Unfortunately, LLVM TSAN decided to remove OpenBSD support, which
means that the syso files cannot currently be regenerated (see #52090).
The race_openbsd.syso contains a reference to the syscall symbol,
which has been removed from OpenBSD's libc in 7.5. As such, this
means that the race detector no longer works on openbsd/amd64 (at
least until LLVM TSAN support is reinstated for OpenBSD).
Updates #63900
Change-Id: I3474fc43a94e5197815862b7dc420b71d5e08815
Reviewed-on: https://go-review.googlesource.com/c/go/+/582255
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Joel Sing <joel@sing.id.au>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Follow-up CL help package like unique use Clone.
Change-Id: Ie64adf7e1a331f47c3cfe178c368d72fc72493ff
GitHub-Last-Rev: 499476cc4a
GitHub-Pull-Request: golang/go#67106
Reviewed-on: https://go-review.googlesource.com/c/go/+/581956
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Usually, when we increment counters for flags, the counter only contains
the flag name. For the buildmode flag, we now include the flag value
because there's a limited set of values.
We can't use CountFlags directly anymore since we have different
behavior for buildmode.
Change-Id: I956a1a97d62850df3199b5514ad507ea51355c9f
Reviewed-on: https://go-review.googlesource.com/c/go/+/582896
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
This change removes cmd/go/testdata/counters.txt. It also removes the
code that prepares it and checks that it contains all registered
counters as well as counters for all flags and subcommands. It removes
the counter registration mechanism, and uses telemetry.NewCounter to
create new counters instead. It keeps the tests that check that at least
one counter is incremented if the go command is invoked in a script test.
Change-Id: Ic6bda5c64e90f0dd7e221968fce0e375e84d6e17
Cq-Include-Trybots: luci.golang.try:gotip-windows-amd64-longtest,gotip-linux-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/582715
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
For inlined frames f.Func is nil and f.Func.Name is an empty string.
f.Function is correct all the time.
Change-Id: I7c30f80e7176128ae5576b130d2891f884ee47c4
Reviewed-on: https://go-review.googlesource.com/c/go/+/581996
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: David Chase <drchase@google.com>
To help packages use these functions like "os" which using
the copied function "stringsTrimSuffix".
Change-Id: I223028ed264c7b7e95534b4883223af0988cda68
GitHub-Last-Rev: 2fd8fbf528
GitHub-Pull-Request: golang/go#67151
Reviewed-on: https://go-review.googlesource.com/c/go/+/583075
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: qiu laidongfeng2 <2645477756@qq.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
This is a reapplication of CL 564576.
This reduces the go test hash/maphash time
by more than half.
After investigation it was confirmed that
the original CL would cause OOM when 32-bit machine.
This CL add testenv.ParallelOn64Bit for tests
that can be parallel on 64-bit machines,
it is not parallel on 32-bit machines,
because CL 564995 require the same API.
Change-Id: I1b7feaa07716cb3f55db4671653348fabf2396b0
GitHub-Last-Rev: 2827725558
GitHub-Pull-Request: golang/go#66359
Cq-Include-Trybots: luci.golang.try:gotip-linux-386-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/572195
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
The Repeat("-", maxInt) call should produce
panic: runtime error: makeslice: len out of range
instead of
panic: strings: Repeat output length overflow
This PR is only for theory perfection.
Change-Id: If67d87b147d666fbbb7238656f2a0cb6cf1dbb5b
GitHub-Last-Rev: 29dc0cb9c9
GitHub-Pull-Request: golang/go#67068
Reviewed-on: https://go-review.googlesource.com/c/go/+/581936
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
The golang.org/x/tools/go/analysis/passes/stdversion was forcibly
added by means of an import in a throwaway file not committed.
Change-Id: I194012ae354f6f8d2d0c1fa39612e5554a4ab1cf
Reviewed-on: https://go-review.googlesource.com/c/go/+/582555
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Clarify that the range expression of a "for" loop is called *just* once to
rule out that it might be re-evaluated after each iteration.
Change-Id: Iedb61cd29e5238ac0168b8ac01c34d6208cc4312
Reviewed-on: https://go-review.googlesource.com/c/go/+/582775
Reviewed-by: Robert Griesemer <gri@google.com>
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>
This is the gccgo version of CL 15605.
For https://gcc.gnu.org/PR114699
For #11100
For #12582
For #12873
Change-Id: I30e23130737022d772971f0bd629b57269174886
Reviewed-on: https://go-review.googlesource.com/c/go/+/582975
Reviewed-by: Than McIntosh <thanm@google.com>
Commit-Queue: 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>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Goids are designed to be big enough that they will never be reused:
a uint64 is enough to generate a new goroutine every nanosecond
for 500+ years before wrapping around, and after 500 years you
should probably stop and pick up some security updates.
This note was added in CL 70993 and appears to have just been
a misunderstanding by the CL author.
Change-Id: Ida7099b5191a4e5dbb1e3e9e44b4b86d7779fd6d
Reviewed-on: https://go-review.googlesource.com/c/go/+/582895
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Russ Cox <rsc@golang.org>