We restored registers correctly in the usual case where the thread
is a Go-managed thread and called runtime·sighandler, but we
failed to do so when runtime·sigtramp was called on a cgo-created
thread. In that case, runtime·sigtramp called runtime·badsignal,
a Go function, and did not restore registers after it returned
LGTM=rsc, dave
R=rsc, dave
CC=golang-codereviews, minux.ma
https://golang.org/cl/
105280050
MOVQ DI, 0(SP)
MOVQ $runtime·badsignal(SB), AX
CALL AX
- RET
+ JMP exit
allgood:
// save g
MOVQ 80(SP), R10
MOVQ R10, g(BX)
+exit:
// restore registers
MOVQ 32(SP), BX
MOVQ 40(SP), BP