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: internal compiler error: 'f': value .autotmp_1 (nil) incorrectly live at entry [1.21 backport] #61781

Closed
gopherbot opened this issue Aug 5, 2023 · 2 comments
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

@cuonglm requested issue #61778 to be considered for backport to the next 1.21 minor release.

@gopherbot please backport this to go1.21

The ICE introduced in CL 497276, where an optimization for len(string([]byte)) was added.

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

Change https://go.dev/cl/516535 mentions this issue: [release-branch.go1.21] cmd/compile: fix missing init nodes for len(string([]byte)) optimization

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

Closed by merging 1755d14 to release-branch.go1.21.

gopherbot pushed a commit that referenced this issue Aug 11, 2023
…tring([]byte)) optimization

CL 497276 added optimization for len(string([]byte)) by avoiding call to
slicebytetostring. However, the bytes to string expression may contain
init nodes, which need to be preserved. Otherwise, it would make the
liveness analysis confusing about the lifetime of temporary variables
created by init nodes.

Fixes #61781

Change-Id: I6d1280a7d61bcc75f11132af41bda086f084ab54
Reviewed-on: https://go-review.googlesource.com/c/go/+/516375
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/516535
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