]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: remove races introduced in abiutils field update
authorDavid Chase <drchase@google.com>
Wed, 3 Mar 2021 04:39:12 +0000 (23:39 -0500)
committerDavid Chase <drchase@google.com>
Wed, 3 Mar 2021 17:59:50 +0000 (17:59 +0000)
commitd6f6ef6358f15d6e49d949749869f199d99d5047
treead5ba4270e2b8dba7ab7b62e455467347be09d3b
parent3e524ee65addd8a30bbfb4fd69508d429fda6d4f
cmd/compile: remove races introduced in abiutils field update

This fix uses mutex around the problematic store and subsequent access;
if this causes performance problems later a better fix is to do all the
ABI binding in gc/walk where it is single-threaded.

Change-Id: I488f28ab75beb8351c856fd50b0095cab463642e
Reviewed-on: https://go-review.googlesource.com/c/go/+/298109
Trust: David Chase <drchase@google.com>
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/cmd/compile/internal/abi/abiutils.go
src/cmd/compile/internal/ssagen/ssa.go