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: ICE: panic: interface conversion: ir.Node is *ir.ConvExpr, not *ir.IndexExpr [1.22 backport] #66178

Closed
gopherbot opened this issue Mar 8, 2024 · 4 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 #66096 to be considered for backport to the next 1.22 minor release.

@gopherbot please backport this to go1.22, this bug was introduced during go1.22 development, causing an internal compiler error which is a serious issue.

The fix is small and safe.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Mar 8, 2024
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Mar 8, 2024
@gopherbot gopherbot added this to the Go1.22.2 milestone Mar 8, 2024
@gopherbot
Copy link
Author

Change https://go.dev/cl/569818 mentions this issue: [release-branch.go1.22] cmd/compile: fix copying SSA-able variables optimization

@mdempsky
Copy link
Member

I recommend approving this backport.

@cuonglm
Copy link
Member

cuonglm commented Mar 13, 2024

cc @golang/release

@dr2chase dr2chase added the CherryPickApproved Used during the release process for point releases label Mar 20, 2024
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Mar 20, 2024
gopherbot pushed a commit that referenced this issue Mar 26, 2024
…ptimization

CL 541715 added an optimization to copy SSA-able variables.

When handling m[k] = append(m[k], ...) case, it uses ir.SameSafeExpr to
check that m[k] expressions are the same, then doing type assertion to
convert the map index to ir.IndexExpr node. However, this assertion is
not safe for m[k] expression in append(m[k], ...), since it may be
wrapped by ir.OCONVNOP node.

Fixing this by un-wrapping any ir.OCONVNOP before doing type assertion.

Fixes #66178

Change-Id: I9ff7165ab97bc7f88d0e9b7b31604da19a8ca206
Reviewed-on: https://go-review.googlesource.com/c/go/+/569716
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/569818
Reviewed-by: David Chase <drchase@google.com>
@gopherbot
Copy link
Author

Closed by merging e71b0b1 to release-branch.go1.22.

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

4 participants