runtime: fix bug in maps at the intersection of iterators, growing, and NaN keys

If an iterator is started while a map is in the middle of a grow,
and the map has NaN keys, then those keys might get returned by
the iterator more than once.  This fix makes the evacuation decision
deterministic and repeatable for NaN keys so each one gets returned
only once.

R=golang-dev, r, khr, iant
CC=golang-dev
https://golang.org/cl/14367043
This commit is contained in:
Keith Randall 2013-10-04 13:54:03 -07:00
parent 15baf6b4ac
commit 869368a528
3 changed files with 91 additions and 15 deletions

View file

@ -81,3 +81,6 @@ var Int32Hash = int32Hash
var Int64Hash = int64Hash
func GogoBytes() int32
var hashLoad float64 // declared in hashmap.c
var HashLoad = &hashLoad