-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
weak: weak.Pointer[T] can be misused with type conversions #71583
Comments
Marking this as a release-blocker since doing the same thing like in #56603 is technically a backwards incompatible change. |
Change https://go.dev/cl/647195 mentions this issue: |
Change https://go.dev/cl/647215 mentions this issue: |
Hi @mknyszek, I sent https://go.dev/cl/647195, which seems to pass the trybots. @qiulaidongfeng also sent https://go.dev/cl/647215. Do those seem like reasonable approaches? |
Shoot. Maybe we should have a more generic (ha) test for this on the standard library, or perhaps it should be part of the per-release API checker. Thank you both @qiulaidongfeng and @thepudds for sending CLs! I'll probably go with @thepudds' CL just because it adds a couple of tests, for the next person who trips over the same issue. |
Just want to note that this needs also to be fixed on the release-branch.go1.24 branch, as this is a new API. |
Yep, we'll have to cherry-pick the change. |
CC @cherrymui. |
Change https://go.dev/cl/647435 mentions this issue: |
Since this release-blocker is in the Go 1.24 milestone, re-opening to track cherry-picking to release-branch.go1.24. |
…ointers Prevent conversions between Pointer types, like we do for sync/atomic.Pointer. Fixes #71583 Change-Id: I20e83106d8a27996f221e6cd9d52637b0442cea4 Reviewed-on: https://go-review.googlesource.com/c/go/+/647195 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> (cherry picked from commit 8163ea1) Reviewed-on: https://go-review.googlesource.com/c/go/+/647435 Reviewed-by: Carlos Amedee <carlos@golang.org> TryBot-Bypass: Cherry Mui <cherryyz@google.com>
This is the second time something like this happens in the std, see #56603.
Previously reported at: #67552 (comment)
CC @mknyszek
The text was updated successfully, but these errors were encountered: