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: changing a hot concrete method to interface method triggers a PGO ICE [1.22 backport] #67017

Closed
gopherbot opened this issue Apr 24, 2024 · 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

@prattmic requested issue #67016 to be considered for backport to the next 1.22 minor release.

@gopherbot Please backport to 1.22. These compiler failures can happen across otherwise benign refactors, where the profile was collected prior to the refactor.

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

Change https://go.dev/cl/581438 mentions this issue: [release-branch.go1.22] cmd/compile: bail PGO method lookup on interface types

@joedian joedian added the CherryPickApproved Used during the release process for point releases label Apr 24, 2024
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Apr 24, 2024
gopherbot pushed a commit that referenced this issue Apr 26, 2024
…ace types

Interface types don't have concrete method implementations, so it does
not make sense to attempt a lookup.

An interface method would not normally appear in a PGO profile as it has
no symbol in the final binary. However it can appear if the method was
concrete when the profile was collected and it has since been refactored
to an interface method in the code being compiled.

The guards here (OTYPE, !Alias, !IsInterface) now match
noder.linker.relocObj, which does a similar iteration of all methods.

For #67016.
Fixes #67017.

Change-Id: I858c58929c890ac0b2019fbd7c99f683ab63f8bb
Reviewed-on: https://go-review.googlesource.com/c/go/+/581436
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
(cherry picked from commit 508e761)
Reviewed-on: https://go-review.googlesource.com/c/go/+/581438
@gopherbot
Copy link
Author

Closed by merging a7ff78d 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

2 participants