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/arm: off-by-one error in trampoline phase call reachability calculation [1.19 backport] #59058

Closed
gopherbot opened this issue Mar 15, 2023 · 2 comments
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link

@thanm requested issue #59034 to be considered for backport to the next 1.19 minor release.

@gopherbot please open backport issues

@gopherbot
Copy link
Author

Change https://go.dev/cl/476935 mentions this issue: [release-branch.go1.19] cmd/link/internal/arm: fix off-by-1 in trampoline reachability computation

@heschi heschi added the CherryPickApproved Used during the release process for point releases label Mar 22, 2023
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Mar 22, 2023
gopherbot pushed a commit that referenced this issue Mar 22, 2023
…line reachability computation

Tweak the code in trampoline generation that determines if a given
call branch will reach, changing the lower limit guard from "x <
-0x800000" to "x <= -0x800000". This is to resolve linking failures
when the computed displacement is exactly -0x800000, which results in
errors of the form

  .../ld.gold: internal error in arm_branch_common, at ../../gold/arm.cc:4079

when using the Gold linker, and

  ...:(.text+0x...): relocation truncated to fit: R_ARM_CALL against `runtime.morestack_noctxt'

when using the bfd linker.

Fixes #59058.
Updates #59034.
Updates #58425.

Change-Id: I8a76986b38727df1b961654824c2af23f06b9fcf
Reviewed-on: https://go-review.googlesource.com/c/go/+/475957
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
(cherry picked from commit f26bf20)
Reviewed-on: https://go-review.googlesource.com/c/go/+/476935
@gopherbot
Copy link
Author

Closed by merging 826fa3e to release-branch.go1.19.

@golang golang locked and limited conversation to collaborators Mar 21, 2024
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

2 participants