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: TestCgoExternalThreadSIGPROF fails on netbsd7-amd64 #14052
Comments
Is this a regression from Go 1.5, or a breakage from NetBSD 6 to NetBSD 7? |
I have a patch for TestCgoExternalThreadSIGPROF that I will send soon. Coincidentally I opened issue #14063 earlier today for TestSignalExitStatus. I have no idea what is going on with that one. |
CL https://golang.org/cl/18815 mentions this issue. |
On NetBSD a signal handler returns to the kernel by calling the setcontext system call with the context passed to the signal handler. The implementation of runtime·sigreturn_tramp for amd64, copied from the NetBSD libc, expects that context address to be in r15. That works in the NetBSD libc because r15 is preserved across the call to the signal handler. It fails in the Go library because r15 is not preserved. There are various ways to fix this; this one uses the simple approach, essentially identical to the one in the NetBSD libc, of preserving r15 across the signal handler proper. Looking at the code for 386 and arm suggests that they are OK. However, I have not actually tested them. Update #14052. Change-Id: I2b516b1d05fe5d3b8911e65ca761d621dc37fa1b Reviewed-on: https://go-review.googlesource.com/18815 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
On go1.5.3 netbsd7 amd64 it looks similar, but still different:
|
CL https://golang.org/cl/18835 mentions this issue. |
CL https://golang.org/cl/29491 mentions this issue. |
…lly on dragonfly This change reverts CL 18835 which is a workaroud for older DragonFly BSD kernels, and fixes #14051, #14052 and #14067 in a more general way the same as other platforms except NetBSD. This change also bumps the minimum required version of DragonFly BSD kernel to 4.4.4. Fixes #16329. Change-Id: I0b44b6afa675f5ed9523914226bd9ec4809ba5ae Reviewed-on: https://go-review.googlesource.com/29491 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Go version: devel from https://go-review.googlesource.com/#/c/18776/3
Platform: netbsd7-amd64
When I bootstrap the compiler using the following command, it fails.
The output is:
The text was updated successfully, but these errors were encountered: