]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: fix race detector instrumentation of type switches.
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Tue, 16 Jul 2013 07:04:20 +0000 (09:04 +0200)
committerRémy Oudompheng <oudomphe@phare.normalesup.org>
Tue, 16 Jul 2013 07:04:20 +0000 (09:04 +0200)
commita15074c4dc909c6e27a98f8464b79863f446e8cc
tree70fe8c480c53b41887e2b95494a113626f63968c
parent45cff65502ace2783f05cf27383d807f07627cf2
cmd/gc: fix race detector instrumentation of type switches.

A type switch on a value with map index expressions,
could get a spurious instrumentation from a OTYPESW node.
These nodes do not need instrumentation because after
walk the type switch has been turned into a sequence
of ifs.

Fixes #5890.

R=golang-dev, dvyukov
CC=golang-dev
https://golang.org/cl/11308043
src/cmd/gc/racewalk.c
src/pkg/runtime/race/testdata/mop_test.go