Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: KeepAlive doesn't actually keep stack object alive [1.12 backport] #30478

Closed
gopherbot opened this issue Feb 28, 2019 · 2 comments
Closed
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@gopherbot
Copy link

@bcmills requested issue #30476 to be considered for backport to the next 1.12 minor release.

@gopherbot, please backport to Go 1.12: this is a regression in a core runtime behavior.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Feb 28, 2019
@gopherbot gopherbot added this to the Go1.12.1 milestone Feb 28, 2019
@gopherbot
Copy link
Author

Change https://golang.org/cl/164627 mentions this issue: [release-branch.go1.12] cmd/compile: make KeepAlive work on stack object

@bcmills bcmills added the CherryPickApproved Used during the release process for point releases label Mar 1, 2019
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Mar 1, 2019
@bcmills bcmills added the NeedsFix The path to resolution is known, but the work has not been done. label Mar 1, 2019
@gopherbot
Copy link
Author

Closed by merging 6fc1242 to release-branch.go1.12.

gopherbot pushed a commit that referenced this issue Mar 13, 2019
Currently, runtime.KeepAlive applied on a stack object doesn't
actually keeps the stack object alive, and the heap object
referenced from it could be collected. This is because the
address of the stack object is rematerializeable, and we just
ignored KeepAlive on rematerializeable values. This CL fixes it.

Updates #30476.
Fixes #30478.

Change-Id: Ic1f75ee54ed94ea79bd46a8ddcd9e81d01556d1d
Reviewed-on: https://go-review.googlesource.com/c/164537
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
(cherry picked from commit 40df9cc)
Reviewed-on: https://go-review.googlesource.com/c/go/+/164627
@golang golang locked and limited conversation to collaborators Mar 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

2 participants