This CL makes sure we walk the newly generated assignment. Part of
that walk makes sure that all symbols for strings are emitted before
we start referencing them during the parallel compilation
phase. Without this change, those references during the parallel phase
do a create-if-not-exist, which leads to a data race.
I'm not 100% sure this is the fix for the issues below, but optimistically
assuming it is...
Fixes #28170
Fixes #28159
Change-Id: Ic63d5160ad9be5cb23fa6bbb2183e4848776c0ff
Reviewed-on: https://go-review.googlesource.com/c/141648
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
as := nod(OAS,
nod(OIND, p, nil),
nod(OIND, convnop(nod(OSPTR, s, nil), t.PtrTo()), nil))
- init.Append(typecheck(as, Etop))
+ as = typecheck(as, Etop)
+ as = walkstmt(as)
+ init.Append(as)
}
// Slice the [n]byte to a []byte.