]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: handle degenerate write barrier case
authorKeith Randall <khr@google.com>
Thu, 12 Jul 2018 18:44:05 +0000 (11:44 -0700)
committerKeith Randall <khr@golang.org>
Thu, 12 Jul 2018 19:06:09 +0000 (19:06 +0000)
commit85cfa4d55e177a70913ce8977ce847af7c4298e2
tree5e1690662da0daf1a6dda3e4b7b9e43eddb92b3b
parent0029cd479e344e0fa6930331cf86e6f985508163
cmd/compile: handle degenerate write barrier case

If both branches of a write barrier test go to the same block,
then there's no unsafe points.

This can only happen if the resulting memory state is somehow dead,
which can only occur in degenerate cases, like infinite loops. No
point in cleaning up the useless branch in these situations.

Fixes #26024.

Change-Id: I93a7df9fdf2fc94c6c4b1fe61180dc4fd4a0871f
Reviewed-on: https://go-review.googlesource.com/123655
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/gc/plive.go
test/fixedbugs/issue26024.go [new file with mode: 0644]