[dev.link] cmd/compile: fix data race on LSym.Pkg
LSym may be created concurrently. Reading/writing LSym.Pkg may cause data race (see https://build.golang.org/log/f0351c5cc7bf4c92e3aa5e78e294c2d009ebf118). Fix this by setting LSym.Pkg only when holding the lock. Change-Id: Ib3160ecf47c4ca530b09369e0e8284db6597cfd0 Reviewed-on: https://go-review.googlesource.com/c/go/+/198492Reviewed-by:Than McIntosh <thanm@google.com>
Showing
Please register or sign in to comment