]> Cypherpunks repositories - gostls13.git/commit
runtime: fix bug in maps at the intersection of iterators, growing, and NaN keys
authorKeith Randall <khr@golang.org>
Fri, 4 Oct 2013 20:54:03 +0000 (13:54 -0700)
committerKeith Randall <khr@golang.org>
Fri, 4 Oct 2013 20:54:03 +0000 (13:54 -0700)
commit869368a528cf4a8b154176b34182dbfa4a42f21a
tree5223f2740ae7ad253cc5f5e5d49d48809d48b68b
parent15baf6b4ace720e7b2cfe5911d43aa9ede1a4f97
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
src/pkg/runtime/export_test.go
src/pkg/runtime/hashmap.c
src/pkg/runtime/map_test.go