-
Notifications
You must be signed in to change notification settings - Fork 18k
armv5tel "Illegal instruction" since golang 1.21.0 #62475
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
Comments
Can you tell us what the illegal instruction is? Run the code under a debugger and disassemble around the faulting PC. |
@randall77, I don't think it's possible for me to run a debugger on armv5. As mentioned above, the toolchain is not available for armv5 so I need to build it on amd64 and then copy it over to armv5. That being said, this is not an issue with the program I wrote as the program is tiny and it's also happening in VictoriaMetrics/VictoriaMetrics#4965 In any case, what other info can I provide that might aid in debugging this? |
I built hello world with both 1.20 and 1.21. Disassembled both and looked for an instruction in the 1.21 binary that was not in the 1.20 binary. The only one I found is That said, did you set Not sure what would have changed from 1.20 to 1.21. |
Now it works @randall77 do you know if prior to 1.21, default GOARM was also 6? |
My memory is hazy on that front. @golang/arm |
Alright, that's great. Closing this issue. Thanks @randall77! |
This did indeed change for 1.21:
The issue for reproducible builds is #58884 . |
Pass GOARM=5 when building GOARCH=arm production builds, since the default value for this env var has been changed to GOARM=6 since Go1.21.0. See #4965 and golang/go#62475
Pass GOARM=5 when building GOARCH=arm production builds, since the default value for this env var has been changed to GOARM=6 since Go1.21.0. See #4965 and golang/go#62475
Pass GOARM=5 when building GOARCH=arm production builds, since the default value for this env var has been changed to GOARM=6 since Go1.21.0. See #4965 and golang/go#62475
Pass GOARM=5 when building GOARCH=arm production builds, since the default value for this env var has been changed to GOARM=6 since Go1.21.0. See #4965 and golang/go#62475
Pass GOARM=5 when building GOARCH=arm production builds, since the default value for this env var has been changed to GOARM=6 since Go1.21.0. See #4965 and golang/go#62475
Pass GOARM=5 when building GOARCH=arm production builds, since the default value for this env var has been changed to GOARM=6 since Go1.21.0. See #4965 and golang/go#62475
What version of Go are you using (
go version
)?Compiling with:
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?amd64 build environment:
go env
Outputarmv5 target environment
Issue
armv5tel is no longer supported as a runtime target (not sure if all armv5). Since the golang toolchain is not available on armv5, I'm building on amd64 and copying to armv5. I tried a simple hello world. It works with 1.20.7 but fails with 1.21.0
Full reproducer
On build machine (amd64)
vi helloworld.go
Then, compile it with golang 1.20.7 and 1.21 for linux and arm
Then copy both to armv5 machine
On target machine (armv5)
Run both
The one built with golang 1.20.7 succeeds whereas the one built with 1.21.0 fails
The text was updated successfully, but these errors were encountered: