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/link: nil pointer panic during compile for openbsd/mips64 #58240
Comments
CC @golang/compiler |
CC @golang/mips @golang/openbsd |
The CL https://go-review.googlesource.com/c/go/+/233523 introduces this behavior cc @thanm Pre-CL, that would be a fatal error. |
I'll take a look. |
@calmh looks like this is actually expected behavior given the current state of openbsd + mips64. What is happening here is that the code in the golang.org/x/sys repo has moved forward with switching OpenBSD to use libc as opposed to directly syscall invocation. The app in question has a reachable calll to golang.org/x/sys/unix.mmap, which results in the following chain of dependent functions being pulled in (this is from the linker's -dumpdep flag):
where libc_mmap is of type SDYNIMPORT (meaning that at runtime its definition will be appearing in a shared library). The problem here is that although It's unfortunate that the golang.org/x/sys/unix change was rolled out before things were ready in the Go linker realm, but it appears that's just what was decided by the OpenBSD maintainers. I will send a CL to change things so that we get an error in this case as opposed to a crash, but until https://go.dev/cl/415815 and friends are merged, folks will see these same sorts of errors. |
@4a6f656c FYI |
Change https://go.dev/cl/466895 mentions this issue: |
Issue an error (instead of crashing) when encountering a symbol that requires dynamic relocations on mips/mips64. The dynimport support is in progress, but is not done yet, so rather than crashing, print a message indicating that the feature is not yet implemented and exit. Fixes golang#58240. Change-Id: I9ad64c89e4f7b4b180964b35ad1d72d375f2df7f Reviewed-on: https://go-review.googlesource.com/c/go/+/466895 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Joel Sing <joel@sing.id.au> Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Than McIntosh <thanm@google.com>
I reproduced this today with go1.20.3. Using gotip yields another error now: go1.20.3
gotip
Commit: sylr/kustomize@eec6096 |
Noticed this on Go 1.19.5, after updating a few dependencies to support Go 1.20.
The text was updated successfully, but these errors were encountered: