]> Cypherpunks repositories - gostls13.git/commit
weak: prevent unsafe conversions using weak pointers
authorthepudds <thepudds1460@gmail.com>
Thu, 6 Feb 2025 13:07:38 +0000 (08:07 -0500)
committerGopher Robot <gobot@golang.org>
Thu, 6 Feb 2025 21:16:59 +0000 (13:16 -0800)
commit8163ea1458763aa38fa9197e479bd30cb0145429
treee4191d199aef072217af0bdeb64d76cf52ca899e
parent478ad013f90fe1dbb199d22f41b93c920ae0d5e9
weak: prevent unsafe conversions using weak pointers

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>
src/weak/pointer.go
src/weak/pointer_test.go
test/weak.go [new file with mode: 0644]