]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] cmd/internal/obj: access Attribute atomically
authorCherry Zhang <cherryyz@google.com>
Wed, 3 Feb 2021 23:10:04 +0000 (18:10 -0500)
committerCherry Zhang <cherryyz@google.com>
Thu, 4 Feb 2021 20:25:59 +0000 (20:25 +0000)
commit52d5cb2822966c00ce2ef97eb08bec4850d76fb2
tree0a3ce90171f0bd8a4b2da07833d37d25f2b46c9a
parentbc451b5770dc99b6a74934c26fd11a8cdc172bb1
[dev.regabi] cmd/internal/obj: access Attribute atomically

Symbol's Attributes and ABI are in the same word. In the
concurrent backend, we may read one symbol's ABI (the callee)
while setting its attributes in another goroutine.

Fix racecompile build.

Change-Id: I500e869bafdd72080119ab243db94eee3afcf926
Reviewed-on: https://go-review.googlesource.com/c/go/+/289290
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/internal/obj/link.go