diff options
author | Joel Sing <joel@sing.id.au> | 2021-05-29 04:06:56 +1000 |
---|---|---|
committer | Joel Sing <joel@sing.id.au> | 2021-08-16 07:44:47 +0000 |
commit | 160d7972607d5c630c7cfd1b4b54f7c27c3387b1 (patch) | |
tree | 8b2ab6f5641fdf0abf77b65f28486f83f79cc159 /src/runtime | |
parent | 6a760d6c36675335eb1756cc2b3f711ec33aa2e2 (diff) | |
download | go-160d7972607d5c630c7cfd1b4b54f7c27c3387b1.tar.gz go-160d7972607d5c630c7cfd1b4b54f7c27c3387b1.zip |
runtime: correct mips64 asmcgocall signal stack behaviour
Do not switch to the g0 stack if we're already running on the signal
stack, otherwise all kind of fun ensues.
Updates #36435
Change-Id: I57f35d75b9ee4f92b997713b4cdd38ce881705e6
Reviewed-on: https://go-review.googlesource.com/c/go/+/334880
Trust: Joel Sing <joel@sing.id.au>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/runtime')
-rw-r--r-- | src/runtime/asm_mips64x.s | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/runtime/asm_mips64x.s b/src/runtime/asm_mips64x.s index b2e2384c36..940a38a0d6 100644 --- a/src/runtime/asm_mips64x.s +++ b/src/runtime/asm_mips64x.s @@ -426,6 +426,8 @@ TEXT ·asmcgocall(SB),NOSPLIT,$0-20 // We get called to create new OS threads too, and those // come in on the m->g0 stack already. MOVV g_m(g), R5 + MOVV m_gsignal(R5), R6 + BEQ R6, g, g0 MOVV m_g0(R5), R6 BEQ R6, g, g0 |