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/go: Segfault on ppc64le during Go 1.18 build on Alpine Linux [1.18 backport] #51874

Closed
gopherbot opened this issue Mar 22, 2022 · 3 comments
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link
Contributor

@pmur requested issue #51787 to be considered for backport to the next 1.18 minor release.

@gopherbot please consider this for backport to 1.18, it is a severe bug for alpine.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Mar 22, 2022
@gopherbot gopherbot added this to the Go1.18.1 milestone Mar 22, 2022
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/394794 mentions this issue: [release-branch.go1.18] runtime: make static/dynamic startup detection work with musl on ppc64le

@toothrot toothrot added the CherryPickApproved Used during the release process for point releases label Mar 23, 2022
@toothrot
Copy link
Contributor

Approved. This is a serious issue with no workaround.

@gopherbot
Copy link
Contributor Author

Closed by merging 0bf8319 to release-branch.go1.18.

gopherbot pushed a commit that referenced this issue Apr 4, 2022
…n work with musl on ppc64le

The glibc loader explicitly sets the first doubleword on the stack (R1)
to $0 to indicate it was dynamically loaded.

An ELFv2 ABI compliant loader will set R3/R4 to argc/argv when starting
the process, and R13 to TLS. musl is not compliant. Instead it passes
argc/argv like the kernel, but R3/R4 are in an undefined state and R13
is valid.

With the knowledge above, the startup code can be modified to
dynamically handle all three cases when linked internally.

Fixes #51874

Change-Id: I5de33862c161900d9161817388bbc13a65fdc69c
Reviewed-on: https://go-review.googlesource.com/c/go/+/394654
Reviewed-by: Cherry Mui <[email protected]>
Run-TryBot: Paul Murphy <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Trust: Paul Murphy <[email protected]>
Trust: Lynn Boger <[email protected]>
Reviewed-on: https://go-review.googlesource.com/c/go/+/394794
Trust: Emmanuel Odeke <[email protected]>
@golang golang locked and limited conversation to collaborators Apr 4, 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

2 participants