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 · 1 comment
Open

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

4a6f656c opened this issue Aug 5, 2022 · 1 comment
Assignees
Labels
arch-arm compiler/runtime help wanted NeedsFix
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 label Aug 5, 2022
@seankhliao seankhliao added NeedsDecision arch-arm labels Aug 5, 2022
@cherrymui
Copy link
Member

cherrymui commented Aug 8, 2022

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 and removed NeedsDecision labels Aug 8, 2022
@4a6f656c 4a6f656c self-assigned this Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-arm compiler/runtime help wanted NeedsFix
Projects
Status: No status
Development

No branches or pull requests

5 participants