• Dmitry Vyukov's avatar
    cmd/gc: fix handling of OGETG in race mode · 08c43488
    Dmitry Vyukov authored
    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/8690Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    08c43488
inl.go 24.8 KB