-
Notifications
You must be signed in to change notification settings - Fork 17.8k
Comparing changes
Open a pull request
base repository: golang/go
base: go1.23.0
head repository: golang/go
compare: go1.23.1
- 14 commits
- 45 files changed
- 11 contributors
Commits on Aug 14, 2024
-
[release-branch.go1.23] os: fix Chtimes test flakes
It appears that some builders (notably, linux-arm) have some additional security software installed, which apparently reads the files created by tests. As a result, test file atime is changed, making the test fail like these: === RUN TestChtimesOmit ... os_test.go:1475: atime mismatch, got: "2024-07-30 18:42:03.450932494 +0000 UTC", want: "2024-07-30 18:42:02.450932494 +0000 UTC" === RUN TestChtimes ... os_test.go:1539: AccessTime didn't go backwards; was=2024-07-31 20:45:53.390326147 +0000 UTC, after=2024-07-31 20:45:53.394326118 +0000 UTC According to inode(7), atime is changed when more than 0 bytes are read from the file. So, one possible solution to these flakes is to make the test files empty, so no one can read more than 0 bytes from them. For #68687 For #68663 Fixes #68812 Change-Id: Ib9234567883ef7b16ff8811e3360cd26c2d6bdab Reviewed-on: https://go-review.googlesource.com/c/go/+/604315 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Kirill Kolyshkin <kolyshkin@gmail.com> Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Commit-Queue: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> (cherry picked from commit 84266e1) Reviewed-on: https://go-review.googlesource.com/c/go/+/604196
Configuration menu - View commit details
-
Copy full SHA for dbecb41 - Browse repository at this point
Copy the full SHA dbecb41View commit details
Commits on Aug 21, 2024
-
[release-branch.go1.23] os: use O_EXCL instead of O_TRUNC in CopyFS t…
…o disallow rewriting existing files does not exist On Linux, a call to creat() is equivalent to calling open() with flags equal to O_CREAT|O_WRONLY|O_TRUNC, which applies to other platforms as well in a similar manner. Thus, to force CopyFS's behavior to comply with the function comment, we need to replace O_TRUNC with O_EXCL. Fixes #68907 Change-Id: I3e2ab153609d3c8cf20ce5969d6f3ef593833cd1 Reviewed-on: https://go-review.googlesource.com/c/go/+/606095 Auto-Submit: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> (cherry picked from commit aa5d672) Reviewed-on: https://go-review.googlesource.com/c/go/+/606415
Configuration menu - View commit details
-
Copy full SHA for 3c93405 - Browse repository at this point
Copy the full SHA 3c93405View commit details -
[release-branch.go1.23] unique: use TypeFor instead of TypeOf to get …
…type in Make Currently the first thing Make does it get the abi.Type of its argument, and uses abi.TypeOf to do it. However, this has a problem for interface types, since the type of the value stored in the interface value will bleed through. This is a classic reflection mistake. Fix this by implementing and using a generic TypeFor which matches reflect.TypeFor. This gets the type of the type parameter, which is far less ambiguous and error-prone. For #68990. Fixes #68992. Change-Id: Idd8d9a1095ef017e9cd7c7779314f7d4034f01a7 Reviewed-on: https://go-review.googlesource.com/c/go/+/607355 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> (cherry picked from commit 755c18e) Reviewed-on: https://go-review.googlesource.com/c/go/+/607435 Reviewed-by: Ian Lance Taylor <iant@google.com>
Configuration menu - View commit details
-
Copy full SHA for 76346b3 - Browse repository at this point
Copy the full SHA 76346b3View commit details -
[release-branch.go1.23] go/types, types2: Named.cleanup must also han…
…dle *Alias types Named.cleanup is called at the end of type-checking to ensure that a named type is fully set up; specifically that it's underlying field is not (still) a Named type. Now it can also be an *Alias type. Add this case to the respective type switch. Fixes #68894. Change-Id: I29bc0024ac9d8b0152a3d97c82dd28d09d5dbd66 Reviewed-on: https://go-review.googlesource.com/c/go/+/605977 Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: 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> Reviewed-on: https://go-review.googlesource.com/c/go/+/606656
Configuration menu - View commit details
-
Copy full SHA for 9166d2f - Browse repository at this point
Copy the full SHA 9166d2fView commit details -
[release-branch.go1.23] runtime: on AIX, fix call to _cgo_sys_thread_…
…create in _rt0_ppc64_aix_lib The AIX ABI requires allocating parameter save space when calling a function, even if the arguments are passed via registers. gcc sometimes uses this space. In the case of the cgo c-archive tests, it clobbered the storage space of argc/argv which prevented the test program from running the expected test. Fixes #68973 Change-Id: I8a267b463b1abb2b37ac85231f6c328f406b7515 Reviewed-on: https://go-review.googlesource.com/c/go/+/606895 Reviewed-by: 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> Run-TryBot: Paul Murphy <murp@ibm.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-on: https://go-review.googlesource.com/c/go/+/607195 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Configuration menu - View commit details
-
Copy full SHA for 8002845 - Browse repository at this point
Copy the full SHA 8002845View commit details
Commits on Aug 28, 2024
-
[release-branch.go1.23] go/types, types2: use max(fileVersion, go1.21…
…) if fileVersion present Change the rules for how //go:build "file versions" are applied: instead of considering whether a file version is an upgrade or downgrade from the -lang version, always use max(fileVersion, go1.21). This prevents file versions from downgrading the version below go1.21. Before Go 1.21 the //go:build version did not have the meaning of setting the file's langage version. This fixes an issue that was appearing in GOPATH builds: Go 1.23.0 started providing -lang versions to the compiler in GOPATH mode (among other places) which it wasn't doing before, and it set -lang to the toolchain version (1.23). Because the -lang version was greater than go1.21, language version used to compile the file would be set to the //go:build file version. //go:build file versions below 1.21 could cause files that could previously build to stop building. For example, take a Go file with a //go:build line specifying go1.10. If that file used a 1.18 feature, that use would compile fine with a Go 1.22 toolchain. But it would produce an error when compiling with the 1.23.0 toolchain because it set the language version to 1.10 and disallowed the 1.18 feature. This breaks backwards compatibility: when the build tag was added, it did not have the meaning of restricting the language version. For #68658 Fixes #69094 Change-Id: I6cedda81a55bcccffaa3501eef9e2be6541b6ece Reviewed-on: https://go-review.googlesource.com/c/go/+/607955 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Griesemer <gri@google.com> (cherry picked from commit aeac0b6) Reviewed-on: https://go-review.googlesource.com/c/go/+/608935
Configuration menu - View commit details
-
Copy full SHA for 7afe17b - Browse repository at this point
Copy the full SHA 7afe17bView commit details -
[release-branch.go1.23] runtime: store bp on cgocallback as unsafe.Po…
…inter As of CL 580255, the runtime tracks the frame pointer (or base pointer, bp) when entering syscalls, so that we can use fpTracebackPCs on goroutines that are sitting in syscalls. That CL mostly got things right, but missed one very subtle detail. When calling from Go->C->Go, the goroutine stack performing the calls when returning to Go is free to move around in memory due to growth, shrinking, etc. But upon returning back to C, it needs to restore gp.syscall*, including gp.syscallsp and gp.syscallbp. The way syscallsp currently gets updated is automagically: it's stored as an unsafe.Pointer on the stack so that it shows up in a stack map. If the stack ever moves, it'll get updated correctly. But gp.syscallbp isn't saved to the stack as an unsafe.Pointer, but rather as a uintptr, so it never gets updated! As a result, in rare circumstances, fpTracebackPCs can correctly try to use gp.syscallbp as the starting point for the traceback, but the value is stale. This change fixes the problem by just storing gp.syscallbp to the stack on cgocallback as an unsafe.Pointer, like gp.syscallsp. It also adds a comment documenting this subtlety; the lack of explanation for the unsafe.Pointer type on syscallsp meant this detail was missed -- let's not miss it again in the future. Now, we have a fix, what about a test? Unfortunately, testing this is going to be incredibly annoying because the circumstances under which gp.syscallbp are actually used for traceback are non-deterministic and hard to arrange, especially from within testprogcgo where we don't have export_test.go and can't reach into the runtime. So, instead, add a gp.syscallbp check to reentersyscall and entersyscallblock that mirrors the gp.syscallbp consistency check. This probably causes some miniscule slowdown to the syscall path, but it'll catch the issue without having to actually perform a traceback. For #69085. Fixes #69087. Change-Id: Iaf771758f1666024b854f5fbe2b2c63cbe35b201 Reviewed-on: https://go-review.googlesource.com/c/go/+/608775 Reviewed-by: Nick Ripley <nick.ripley@datadoghq.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> (cherry picked from commit 54fe0fd) Reviewed-on: https://go-review.googlesource.com/c/go/+/608835
Configuration menu - View commit details
-
Copy full SHA for 9c939a1 - Browse repository at this point
Copy the full SHA 9c939a1View commit details -
[release-branch.go1.23] go/types, types2: unalias tilde terms in underIs
Unalias the ~T terms during underIs. Before, if T was an alias of U, it may pass T to the iteration function. The iterator function expects an underlying type, under(U), to be passed. This caused several bugs where underIs is used without eventually taking the underlying type. Fixes #68905 Change-Id: Ie8691d8dddaea00e1dcba94d17c0f1b021fc49a2 Reviewed-on: https://go-review.googlesource.com/c/go/+/606075 Reviewed-by: 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> (cherry picked from commit 1a90dcd) Reviewed-on: https://go-review.googlesource.com/c/go/+/607635
Configuration menu - View commit details
-
Copy full SHA for 9625a7f - Browse repository at this point
Copy the full SHA 9625a7fView commit details -
[release-branch.go1.23] database/sql: fix panic with concurrent Conn …
…and Close The current implementation has a panic when the database is closed concurrently with a new connection attempt. connRequestSet.CloseAndRemoveAll sets connRequestSet.s to a nil slice. If this happens between calls to connRequestSet.Add and connRequestSet.Delete, there is a panic when trying to write to the nil slice. This is sequence is likely to occur in DB.conn, where the mutex is released between calls to db.connRequests.Add and db.connRequests.Delete This change updates connRequestSet.CloseAndRemoveAll to set the curIdx to -1 for all pending requests before setting its internal slice to nil. CloseAndRemoveAll already iterates the full slice to close all the request channels. It seems appropriate to set curIdx to -1 before deleting the slice for 3 reasons: 1. connRequestSet.deleteIndex also sets curIdx to -1 2. curIdx will not be relevant to anything after the slice is set to nil 3. connRequestSet.Delete already checks for negative indices For #68949 Fixes #69041 Change-Id: I6b7ebc5a71b67322908271d13865fa12f2469b87 GitHub-Last-Rev: 7d26691 GitHub-Pull-Request: #68953 Reviewed-on: https://go-review.googlesource.com/c/go/+/607238 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Ian Lance Taylor <iant@golang.org> Commit-Queue: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> (cherry picked from commit 08707d6) Reviewed-on: https://go-review.googlesource.com/c/go/+/609255
Configuration menu - View commit details
-
Copy full SHA for 6de5a71 - Browse repository at this point
Copy the full SHA 6de5a71View commit details
Commits on Aug 29, 2024
-
[release-branch.go1.23] cmd: vendor golang.org/x/telemetry@internal-b…
…ranch.go1.23-vendor Update x/telemetry to fix #68976 and #68946. Commands run: go get golang.org/x/telemetry@internal-branch.go1.23-vendor go mod tidy go mod vendor Fixes #68994. Fixes #68995. Change-Id: I63b892ad4c313aa92f21fbd4f519a0b19d725849 Reviewed-on: https://go-review.googlesource.com/c/go/+/609355 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Robert Findley <rfindley@google.com>
Configuration menu - View commit details
-
Copy full SHA for 3d1f1f2 - Browse repository at this point
Copy the full SHA 3d1f1f2View commit details
Commits on Sep 5, 2024
-
[release-branch.go1.23] go/parser: track depth in nested element lists
Prevents stack exhaustion with extremely deeply nested literal values, i.e. field values in structs. Updates #69138 Fixes #69143 Fixes CVE-2024-34155 Change-Id: I2e8e33b44105cc169d7ed1ae83fb56df0c10f1ee Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/1520 Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Russ Cox <rsc@google.com> (cherry picked from commit eb1b038c0d01761694e7a735ef87ac9164c6568e) Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/1560 Commit-Queue: Roland Shoemaker <bracewell@google.com> Reviewed-by: Tatiana Bradley <tatianabradley@google.com> Reviewed-on: https://go-review.googlesource.com/c/go/+/611175 Auto-Submit: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> TryBot-Bypass: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
Configuration menu - View commit details
-
Copy full SHA for 53487e5 - Browse repository at this point
Copy the full SHA 53487e5View commit details -
[release-branch.go1.23] encoding/gob: cover missed cases when checkin…
…g ignore depth This change makes sure that we are properly checking the ignored field recursion depth in decIgnoreOpFor consistently. This prevents stack exhaustion when attempting to decode a message that contains an extremely deeply nested struct which is ignored. Thanks to Md Sakib Anwar of The Ohio State University (anwar.40@osu.edu) for reporting this issue. Updates #69139 Fixes #69145 Fixes CVE-2024-34156 Change-Id: Iacce06be95a5892b3064f1c40fcba2e2567862d6 Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/1440 Reviewed-by: Russ Cox <rsc@google.com> Reviewed-by: Damien Neil <dneil@google.com> (cherry picked from commit 9f2ea73c5f2a7056b7da5d579a485a7216f4b20a) Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/1581 Commit-Queue: Roland Shoemaker <bracewell@google.com> Reviewed-by: Tatiana Bradley <tatianabradley@google.com> Reviewed-on: https://go-review.googlesource.com/c/go/+/611176 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> TryBot-Bypass: Dmitri Shuralyov <dmitshur@google.com>
Configuration menu - View commit details
-
Copy full SHA for fa8ff1a - Browse repository at this point
Copy the full SHA fa8ff1aView commit details -
[release-branch.go1.23] go/build/constraint: add parsing limits
Limit the size of build constraints that we will parse. This prevents a number of stack exhaustions that can be hit when parsing overly complex constraints. The imposed limits are unlikely to ever be hit in real world usage. Updates #69141 Fixes #69149 Fixes CVE-2024-34158 Change-Id: I38b614bf04caa36eefc6a4350d848588c4cef3c4 Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/1540 Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Russ Cox <rsc@google.com> (cherry picked from commit 0c74dc9e0da0cf1e12494b514d822b5bebbc9f04) Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/1562 Commit-Queue: Roland Shoemaker <bracewell@google.com> Reviewed-by: Tatiana Bradley <tatianabradley@google.com> Reviewed-on: https://go-review.googlesource.com/c/go/+/611177 Reviewed-by: Michael Pratt <mpratt@google.com> TryBot-Bypass: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
Configuration menu - View commit details
-
Copy full SHA for 032ac07 - Browse repository at this point
Copy the full SHA 032ac07View commit details -
[release-branch.go1.23] go1.23.1
Change-Id: I1f2dab5560d3214c8934074a53f7750d8d431936 Reviewed-on: https://go-review.googlesource.com/c/go/+/611196 Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Commit-Queue: Gopher Robot <gobot@golang.org> TryBot-Bypass: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Gopher Robot <gobot@golang.org>
Configuration menu - View commit details
-
Copy full SHA for 69234de - Browse repository at this point
Copy the full SHA 69234deView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff go1.23.0...go1.23.1