Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
runtime: concurrent map write test doesn't check iterators #16278
We now have a best-effort check+fail if a map is concurrently accessed by two goroutines, one of which is a write. (This is a bug in the user's code.) That check is incomplete in the the iterator code path.
Iterators should be considered a read in all circumstances. The check in mapaccessK only happens when iterating during a grow. That check should be moved to mapiternext so it executes for all iterators.