]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: On a runtime.KeepAlive call, keep whole variable alive
authorKeith Randall <khr@golang.org>
Tue, 1 Nov 2016 04:18:00 +0000 (21:18 -0700)
committerKeith Randall <khr@golang.org>
Wed, 2 Nov 2016 21:29:41 +0000 (21:29 +0000)
commit761443edd56832cc1b62f9193f157ca822dfa09e
tree9c861f694cf03cc73414d075fc92a4f3369f7aa1
parent09bb6434f9a8681b81a667e1ff186c61bbe0a50f
cmd/compile: On a runtime.KeepAlive call, keep whole variable alive

We generate an OpKeepAlive for the idata portion of the interface
for a runtime.KeepAlive call.  But given such an op, we need to keep
the entire containing variable alive, not just the range that was
passed to the OpKeepAlive operation.

Fixes #17710

Change-Id: I90de66ec8065e22fb09bcf9722999ddda289ae6e
Reviewed-on: https://go-review.googlesource.com/32477
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
src/cmd/compile/internal/gc/ssa.go
test/fixedbugs/issue17710.go [new file with mode: 0644]