diff options
author | Russ Cox <rsc@golang.org> | 2021-02-19 05:22:35 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2021-02-19 15:30:52 +0000 |
commit | 49add6ad90c3c6e150266b35ae98067d7b52c021 (patch) | |
tree | d6b1b4680c260456886fc6cc65ee2036009911f5 /src/runtime/asm_ppc64x.s | |
parent | fce2a94d84dd5e39e0d53e60beda22da7b6f55b0 (diff) | |
download | go-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_ppc64x.s')
-rw-r--r-- | src/runtime/asm_ppc64x.s | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/asm_ppc64x.s b/src/runtime/asm_ppc64x.s index 56e73742ea..6544048497 100644 --- a/src/runtime/asm_ppc64x.s +++ b/src/runtime/asm_ppc64x.s @@ -547,7 +547,7 @@ TEXT gosave_systemstack_switch<>(SB),NOSPLIT|NOFRAME,$0 MOVD (g_sched+gobuf_ctxt)(g), R31 CMP R0, R31 BEQ 2(PC) - BL runtime·badctxt(SB) + BL runtime·abort(SB) RET #ifdef GOOS_aix |