]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.9] cmd/compile: fix runtime.KeepAlive
authorKeith Randall <khr@golang.org>
Sat, 28 Oct 2017 17:14:08 +0000 (10:14 -0700)
committerAndrew Bonventre <andybons@golang.org>
Mon, 22 Jan 2018 20:25:01 +0000 (20:25 +0000)
commit1cca09a8edb777f094026ad3a88111d56454a1b3
tree832d08aef5e11109b3c7ecdb04b703780e37bb2f
parent5c08eef8706d56fe9509e9bca63d6a7f9d395036
[release-branch.go1.9] cmd/compile: fix runtime.KeepAlive

KeepAlive needs to introduce a use of the spill of the
value it is keeping alive.  Without that, we don't guarantee
that the spill dominates the KeepAlive.

This bug was probably introduced with the code to move spills
down to the dominator of the restores, instead of always spilling
just after the value itself (CL 34822).

Fixes #22458.

Change-Id: I94955a21960448ffdacc4df775fe1213967b1d4c
Reviewed-on: https://go-review.googlesource.com/74210
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-on: https://go-review.googlesource.com/88318
Run-TryBot: Andrew Bonventre <andybons@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/regalloc.go
test/fixedbugs/issue22458.go [new file with mode: 0644]