]> Cypherpunks repositories - gostls13.git/commit
runtime: prevent garbage collection during hashmap insertion
authorJan Ziak <0xe2.0x9a.0x9b@gmail.com>
Tue, 19 Mar 2013 21:17:39 +0000 (22:17 +0100)
committerJan Ziak <0xe2.0x9a.0x9b@gmail.com>
Tue, 19 Mar 2013 21:17:39 +0000 (22:17 +0100)
commit54dffda2b6f967d216b59fcbda116c74b07c4990
tree6e532162f7c62368f2a1c858c9d6adcf4e0ac3df
parentb79afe1b714e225a2b79f639e0956716de34ca64
runtime: prevent garbage collection during hashmap insertion

Inserting a key-value pair into a hashmap storing keys or values
indirectly can cause the garbage collector to find the hashmap in
an inconsistent state.

Fixes #5074.

R=golang-dev, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/7913043
src/pkg/runtime/gc_test.go
src/pkg/runtime/hashmap.c
src/pkg/runtime/mgc0.c