aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/asm_mipsx.s
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2021-02-19 05:22:35 -0500
committerRuss Cox <rsc@golang.org>2021-02-19 15:30:52 +0000
commit49add6ad90c3c6e150266b35ae98067d7b52c021 (patch)
treed6b1b4680c260456886fc6cc65ee2036009911f5 /src/runtime/asm_mipsx.s
parentfce2a94d84dd5e39e0d53e60beda22da7b6f55b0 (diff)
downloadgo-49add6ad90c3c6e150266b35ae98067d7b52c021.tar.gz
go-49add6ad90c3c6e150266b35ae98067d7b52c021.zip
runtime: fix spurious stack overflow detection
The regabi builders are unhappy about badctxt calling throw calling systemstack calling gosave_systemstack_switch calling badctxt, all nosplit, repeating. This wouldn't actually happen since after one systemstack we'd end up on the system stack and the next one wouldn't call gosave_systemstack_switch at all. The badctxt call itself is in a very unlikely assertion failure inside gosave_systemstack_switch. Keep the assertion check but call runtime.abort instead on failure, breaking the detected (but not real) cycle. Change-Id: Iaf5c0fc065783b8c1c6d0f62d848f023a0714b96 Reviewed-on: https://go-review.googlesource.com/c/go/+/294069 Trust: Russ Cox <rsc@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/runtime/asm_mipsx.s')
-rw-r--r--src/runtime/asm_mipsx.s2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/asm_mipsx.s b/src/runtime/asm_mipsx.s
index 0c7d28dcf7..17fbc902c2 100644
--- a/src/runtime/asm_mipsx.s
+++ b/src/runtime/asm_mipsx.s
@@ -413,7 +413,7 @@ TEXT gosave_systemstack_switch<>(SB),NOSPLIT|NOFRAME,$0
// Assert ctxt is zero. See func save.
MOVW (g_sched+gobuf_ctxt)(g), R1
BEQ R1, 2(PC)
- JAL runtime·badctxt(SB)
+ JAL runtime·abort(SB)
RET
// func asmcgocall(fn, arg unsafe.Pointer) int32