Commit d7b678b2 authored by Aram Hăvărneanu's avatar Aram Hăvărneanu Committed by Dave Cheney

runtime: properly restore registers in Solaris runtime·sigtramp

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
parent bbe5c93e
......@@ -164,7 +164,7 @@ TEXT runtime·sigtramp(SB),NOSPLIT,$0
MOVQ DI, 0(SP)
MOVQ $runtime·badsignal(SB), AX
CALL AX
RET
JMP exit
allgood:
// save g
......@@ -259,6 +259,7 @@ allgood:
MOVQ 80(SP), R10
MOVQ R10, g(BX)
exit:
// restore registers
MOVQ 32(SP), BX
MOVQ 40(SP), BP
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment