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

runtime: openbsd/arm fails when compiled with GOARM=5 #54305

Open
4a6f656c opened this issue Aug 5, 2022 · 2 comments
Open

runtime: openbsd/arm fails when compiled with GOARM=5 #54305

4a6f656c opened this issue Aug 5, 2022 · 2 comments
Assignees
Labels
arch-arm Issues solely affecting the 32-bit arm architecture. compiler/runtime Issues related to the Go compiler and/or runtime. help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@4a6f656c
Copy link
Contributor

4a6f656c commented Aug 5, 2022

When the arm architecture is compiled with GOARM=5, the linker rewrites TLS register loads from MRC with a call to runtime.read_tls_fallback - on OpenBSD post 6.9, this fails since runtime.read_tls_fallback is still a direct system call:

https://github.com/golang/go/blob/master/src/runtime/sys_openbsd_arm.s#L90

This code path is generally never hit, since the minimum ARM CPU supported by OpenBSD is v7 and hence GOARM=7 is the default.

We should either:

  1. Revise runtime.read_tls_fallback to use a libc-based system call.

  2. Prevent GOARM < 7 from being used on openbsd/arm and remove the fallback code entirely.

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Aug 5, 2022
@seankhliao seankhliao added NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. arch-arm Issues solely affecting the 32-bit arm architecture. labels Aug 5, 2022
@cherrymui
Copy link
Member

I think we only support GOARM=5 on Linux. On other OSes we only support GOARM=6 or 7.

I think it is okay to have a check with better error message (and remove fallback code). Thanks.

@cherrymui cherrymui added this to the Backlog milestone Aug 8, 2022
@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. labels Aug 8, 2022
@4a6f656c 4a6f656c self-assigned this Aug 9, 2022
@gopherbot
Copy link

Change https://go.dev/cl/443276 mentions this issue: cmd/dist,internal/buildcfg,runtime: only allow GOARM=7 for openbsd/arm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-arm Issues solely affecting the 32-bit arm architecture. compiler/runtime Issues related to the Go compiler and/or runtime. help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
Development

No branches or pull requests

5 participants