You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use micro for a riscv64 project. I cross-compiled using go version go1.18.4 darwin/arm64 using the environment variables GOOS=linux GOARCH=riscv64 CGO_ENABLED=0
The resulting micro binary crashes on Debian with the output pasted below
I was successful using an earlier micro binary on Ubuntu/riscv64 but the Debian build is easier to work with for other reasons
Specifications
Commit hash: 225927b
OS:
Host: Darwin Phils-MacBook-Pro.local 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000 arm64
Guest: Linux debian 5.18.0-2-riscv64 #1 SMP Debian 5.18.5-1 (2022-06-16) riscv64 GNU/Linux
Terminal: iTerm2
Interesting -- this looks like a bug in Go rather than micro. Are you able to reproduce it consistently? It looks like the crash is happening inside the Go garbage collector in the lock-free stack implementation. In particular, I think the fix would involve adding a || GOARCH == "riscv64" check to this if statement: https://github.com/golang/go/blob/462b78fe7027ef0d2e2b40c3cfd1f5a37d307310/src/runtime/lfstack_64bit.go#L49, since it looks like your riscv system is placing the stack at a high memory address. I'm just guessing though. You could see if that fixes it if you make that change locally to your go installation in src/runtime/lfstack_64bit.go.
Ultimately though I think this is an issue that should be opened on the Go repo.
Yes, this crash is on launch and is consistent. I reverified that the same micro binary works fine on Linux ubuntu 5.13.0-1026-generic #29~20.04.1-Ubuntu SMP Fri Jun 3 11:55:52 UTC 2022 riscv64 riscv64 riscv64 GNU/Linux
Description of the problem or steps to reproduce
go version go1.18.4 darwin/arm64
using the environment variablesGOOS=linux GOARCH=riscv64 CGO_ENABLED=0
Specifications
Commit hash: 225927b
OS:
Host: Darwin Phils-MacBook-Pro.local 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000 arm64
Guest: Linux debian 5.18.0-2-riscv64 #1 SMP Debian 5.18.5-1 (2022-06-16) riscv64 GNU/Linux
Terminal: iTerm2
Output
The text was updated successfully, but these errors were encountered: