]> Cypherpunks repositories - gostls13.git/commit
runtime: fix map iterator concurrent map check
authorKeith Randall <khr@golang.org>
Wed, 6 Jul 2016 22:02:49 +0000 (15:02 -0700)
committerKeith Randall <khr@golang.org>
Tue, 16 Aug 2016 21:52:44 +0000 (21:52 +0000)
commite492d9f01890cf61cb009b3b3617238a8947ebbe
treebaef3dbdfd26c39b9261b967d0f7e7636c989452
parenta16a189fb96f824d1eaa53db9c0047c7ce334bd1
runtime: fix map iterator concurrent map check

We should check whether there is a concurrent writer at the
start of every mapiternext, not just in mapaccessK (which is
only called during certain map growth situations).

Tests turned off by default because they are inherently flaky.

Fixes #16278

Change-Id: I8b72cab1b8c59d1923bec6fa3eabc932e4e91542
Reviewed-on: https://go-review.googlesource.com/24749
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
src/runtime/crash_test.go
src/runtime/hashmap.go
src/runtime/testdata/testprog/map.go [new file with mode: 0644]