]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: prevent modification of ONAME/OLITERAL/OTYPES nodes in walkexpr
authorJosh Bleecher Snyder <josharian@gmail.com>
Fri, 24 Mar 2017 23:15:10 +0000 (16:15 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Sat, 25 Mar 2017 00:35:35 +0000 (00:35 +0000)
commitecc6a81617477ddfa961f44e309707a4f864104a
tree3783816a27032fbc5dbbf262b367e64494cac3b3
parentef1ab0f0f4f56e9be490aaca43c799d2eeeed289
cmd/compile: prevent modification of ONAME/OLITERAL/OTYPES nodes in walkexpr

ONAME, OLITERAL, and OTYPE nodes can be shared between functions.
In a concurrent backend, such nodes might be walked concurrently
with being read in other functions.
Arrange for them to be unmodified by walk.

This is a follow-up to CL 38609.

Passes toolstash-check.

Updates #15756

Change-Id: I03ff1d2c0ad81dafac3fd55caa218939cf7c0565
Reviewed-on: https://go-review.googlesource.com/38655
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/subr.go
src/cmd/compile/internal/gc/walk.go