var (
a = "hi"
c = make(chan struct{})
)
func f() {
a = "bye"
close(c)
}
func main() {
go f()
fmt.Println(a)
// fmt.Printf(a)
<-c
}
But changing the fmt call to fmt.Printf where the a value is copied into the format string triggers a race
The text was updated successfully, but these errors were encountered:
jbardin
changed the title
runtime/race: race detector misses when copying into an interface{}
runtime/race: race detector misses when copying into an interface
Sep 17, 2015
The following is missed by the race detector
But changing the fmt call to
fmt.Printf
where thea
value is copied into the format string triggers a raceThe text was updated successfully, but these errors were encountered: