]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: fix handling of OGETG in race mode
authorDmitry Vyukov <dvyukov@google.com>
Thu, 9 Apr 2015 07:08:29 +0000 (10:08 +0300)
committerDmitry Vyukov <dvyukov@google.com>
Fri, 10 Apr 2015 18:40:16 +0000 (18:40 +0000)
commit08c43488ee7a273ce41805b0bb2866507521d15c
tree2db460c0a131108c91c07344e7effc1d9288a4e6
parent4b956ae317355a5bb87e0dd834b9182f0d4929ed
cmd/gc: fix handling of OGETG in race mode

Now that getg is an intrinsic, more runtime functions
gets inlined (in particular, LockOSThread).
Runtime code gets race instrumented after inlining into
other packages. This can lead to false positives,
as race detector ignores all internal synchronization in runtime.
Inling of LockOSThread lead to false race reports on m contents.
See the issue for an example.

Fixes #10380

Change-Id: Ic9b760b53c28c2350bc54a5d4677fcd1c1f86e5f
Reviewed-on: https://go-review.googlesource.com/8690
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/internal/gc/inl.go
src/cmd/internal/gc/racewalk.go