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/link/internal/ppc64: too-far trampoline is reused [1.19 backport] #56834

Closed
gopherbot opened this issue Nov 18, 2022 · 5 comments
Closed
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link

@pmur requested issue #56775 to be considered for backport to the next 1.19 minor release.

@gopherbot please consider a backport to go1.19 and go1.18.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Nov 18, 2022
@gopherbot gopherbot added this to the Go1.19.4 milestone Nov 18, 2022
@gopherbot
Copy link
Author

Change https://go.dev/cl/451916 mentions this issue: [release-branch.go1.18] cmd/link/internal/ppc64: fix trampoline reuse distance calculation

@gopherbot
Copy link
Author

Change https://go.dev/cl/451417 mentions this issue: [release-branch.go1.19] cmd/link/internal/ppc64: fix trampoline reuse distance calculation

@toothrot
Copy link
Contributor

@pmur Hello! Could you please provide rationale as per https://go.dev/wiki/MinorReleases?

@pmur
Copy link
Contributor

pmur commented Nov 30, 2022

This unpredictably prevents linking large binaries if an external linker is unavailable, or not desired on ppc64le or ppc64.

@gopherbot gopherbot modified the milestones: Go1.19.4, Go1.19.5 Dec 6, 2022
@prattmic prattmic added the CherryPickApproved Used during the release process for point releases label Dec 7, 2022
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Dec 7, 2022
@gopherbot
Copy link
Author

Closed by merging 1b4db7e to release-branch.go1.19.

gopherbot pushed a commit that referenced this issue Dec 9, 2022
… distance calculation

If a compatible trampoline has been inserted by a previously laid
function in the same section, and is known to be sufficiently close,
it can be reused.

When testing if the trampoline can be reused, the addend of the direct
call should be ignored. It is already encoded in the trampoline. If the
addend is non-zero, and the target sufficiently far away, and just
beyond direct call reach, this may cause the trampoline to be
incorrectly reused.

This was observed on go1.17.13 and openshift-installer commit f3c53b382
building in release mode with the following error:

github.com/aliyun/alibaba-cloud-sdk-go/services/cms.(*Client).DescribeMonitoringAgentAccessKeyWithChan.func1: direct call too far: runtime.duffzero+1f0-tramp0-1 -2000078

Fixes #56834

Change-Id: I54af957302506d4e3cd5d3121542c83fe980e912
Reviewed-on: https://go-review.googlesource.com/c/go/+/451415
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/451417
Reviewed-by: Joedian Reid <joedian@golang.org>
@golang golang locked and limited conversation to collaborators Dec 9, 2023
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
Projects
None yet
Development

No branches or pull requests

4 participants