]> Cypherpunks repositories - gostls13.git/commit
runtime: fix profile handling of labels for race detector
authorRuss Cox <rsc@golang.org>
Fri, 28 Apr 2017 16:45:46 +0000 (12:45 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 28 Apr 2017 17:37:46 +0000 (17:37 +0000)
commitc82efb1fa370ea83a7e9ff89d85598bb0fdc3fb5
treedbc2d7bbc40f5b368e2344797308fd6808b2d783
parent50f67add81eb9fa032f2e87c639fc42f0cc9de72
runtime: fix profile handling of labels for race detector

If g1 sets its labels and then they are copied into a profile buffer
and then g2 reads the profile buffer and inspects the labels,
the race detector must understand that g1's recording of the labels
happens before g2's use of the labels. Make that so.

Fixes race test failure in CL 39613.

Change-Id: Id7cda1c2aac6f8eef49213b5ca414f7154b4acfa
Reviewed-on: https://go-review.googlesource.com/42111
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
src/runtime/profbuf.go
src/runtime/proflabel.go