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: compile failed with "Value live at entry" [1.19 backport] #54726

Closed
gopherbot opened this issue Aug 29, 2022 · 2 comments
Closed
Labels
CherryPickApproved Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime.
Milestone

Comments

@gopherbot
Copy link

gopherbot commented Aug 29, 2022

@cuonglm requested issue #53702 to be considered for backport to the next 1.19 minor release.

@gopherbot please backport this issue to go1.18 and go1.19

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Aug 29, 2022
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Aug 29, 2022
@gopherbot gopherbot added this to the Go1.19.1 milestone Aug 29, 2022
@gopherbot
Copy link
Author

gopherbot commented Aug 30, 2022

Change https://go.dev/cl/426160 mentions this issue: [release-branch.go1.19] cmd/compile: only inline method wrapper if method don't contain closures

@heschi heschi added the CherryPickApproved Used during the release process for point releases label Aug 31, 2022
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Aug 31, 2022
@gopherbot
Copy link
Author

gopherbot commented Aug 31, 2022

Closed by merging 11033ea to release-branch.go1.19.

gopherbot pushed a commit that referenced this issue Aug 31, 2022
…thod don't contain closures

CL 327871 changes methodWrapper to always perform inlining after global
escape analysis. However, inlining the method may reveal closures, which
require walking all function bodies to decide whether to capture free
variables by value or by ref.

To fix it, just not doing inline if the method contains any closures.

Fixes #54726

Change-Id: I4b0255b86257cc6fe7e5fafbc545cc5cff9113e1
Reviewed-on: https://go-review.googlesource.com/c/go/+/426334
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/426160
bradfitz pushed a commit to tailscale/go that referenced this issue Sep 8, 2022
…thod don't contain closures

CL 327871 changes methodWrapper to always perform inlining after global
escape analysis. However, inlining the method may reveal closures, which
require walking all function bodies to decide whether to capture free
variables by value or by ref.

To fix it, just not doing inline if the method contains any closures.

Fixes golang#54726

Change-Id: I4b0255b86257cc6fe7e5fafbc545cc5cff9113e1
Reviewed-on: https://go-review.googlesource.com/c/go/+/426334
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/426160
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPickApproved Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime.
Projects
None yet
Development

No branches or pull requests

2 participants