mirror of
https://github.com/golang/go
synced 2024-11-23 18:50:05 -07:00
cmd/compile: fix interaction between GOEXPERIMENT=fieldtrack and race detector
Tested by hand. Only lines of code changing are protected by Fieldtrack_enabled > 0, which is never true in standard Go distributions. Fixes #12171. Change-Id: I963b9997dac10829db8ad4bfc97a7d6bf14b55c6 Reviewed-on: https://go-review.googlesource.com/13676 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
9e26cde786
commit
f68d1df6b9
@ -2532,7 +2532,7 @@ func lookdot(n *Node, t *Type, dostrcmp int) *Type {
|
||||
n.Xoffset = f1.Width
|
||||
n.Type = f1.Type
|
||||
if obj.Fieldtrack_enabled > 0 {
|
||||
dotField[typeSym{t, s}] = f1
|
||||
dotField[typeSym{t.Orig, s}] = f1
|
||||
}
|
||||
if t.Etype == TINTER {
|
||||
if Isptr[n.Left.Type.Etype] {
|
||||
|
@ -3873,7 +3873,7 @@ func usefield(n *Node) {
|
||||
if Isptr[t.Etype] {
|
||||
t = t.Type
|
||||
}
|
||||
field := dotField[typeSym{t, n.Right.Sym}]
|
||||
field := dotField[typeSym{t.Orig, n.Right.Sym}]
|
||||
if field == nil {
|
||||
Fatal("usefield %v %v without paramfld", n.Left.Type, n.Right.Sym)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user