cmd/compile: fix code duplication in race-instrumentation
instrumentnode() accidentally copies parent's already-instrumented nodes into child's Ninit block. This generates repeated code in race-instrumentation. This case surfaces only when it duplicates inline-labels, because of compile time error. In other cases, it silently generates incorrect instrumented code. This change prevents it from doing so. Fixes #17449. Change-Id: Icddf2198990442166307e176b7e20aa0cf6c171c Reviewed-on: https://go-review.googlesource.com/31317Reviewed-by: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Showing
test/fixedbugs/issue17449.go
0 → 100644
Please register or sign in to comment