-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
unique: panic for Make(struct{}{}) #69458
Comments
|
CC @mknyszek |
The address of It seems to me that we need a special treatment for zerobase. |
I think a traditional approach is treat zerobase as a null pointer in Handle[T], though I don't know Go can treat a null pointer. |
I think we do need to handle zero-sized types specially, but I don't think the In theory we can have all zero-sized types use the same pointer under the hood, because you can't compare two
I don't really see the use-case for this, so it doesn't seem urgent, but I can send a patch for this. |
Actually @haruyama480 is right, we don't need |
Change https://go.dev/cl/613397 mentions this issue: |
Go version
go version go1.23.1 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
https://go.dev/play/p/esaCHP90Kzk
output
What did you see happen?
fatal error: getWeakHandle on invalid pointer
What did you expect to see?
no panic
The text was updated successfully, but these errors were encountered: