-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
runtime: iterator returns map entries after clear (pre-swissmap) #70189
Comments
Related Issues and Documentation
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.) |
Looks like the fix in #59411 is only a partial one. In this case the |
I haven't found a better way, and I'm trying to implement it according to your idea. |
Change https://go.dev/cl/625275 mentions this issue: |
As i test, this issue also affect go1.22.10, so why not backport it to this version? thanks. |
@jianfengtony Our backport guidelines can be found at https://go.dev/wiki/MinorReleases. Do you think this meets the guidelines for backporting? If so, that wiki page shows how to request a backport. Thanks. |
Go version
tip
Output of
go env
in your module/workspace:What did you do?
When run, this should never print anything. The map is cleared during the first iteration. No map elements should survive to cause a second iteration.
There is no bug now that we've switched by default to swiss maps. The old maps, which you can get with
GOEXPERIMENT=noswissmap
, have this problem. This problem is present in 1.22.6 and 1.23.2. Presumably it has been there sinceclear
was introduced in 1.21.Seems related to #59411. Somehow the fix for that issue doesn't help here.
@prattmic
What did you see happen?
What did you expect to see?
nothing printed
The text was updated successfully, but these errors were encountered: