1
0
mirror of https://github.com/golang/go synced 2024-11-23 09:00:04 -07:00

runtime: fix breakpoint in ppc64x

Currently runtime.Breakpoint generates a SIGSEGV in ppc64.
The solution is an unconditional trap similar to what clang
and gcc do. It is documented in the section C.6 of the ABI Book 3.

Fixes #52101
This commit is contained in:
Alejandro Sáez 2022-03-10 20:40:33 +01:00
parent 62d4c32b7e
commit fff4e5e8ff

View File

@ -106,7 +106,7 @@ DATA runtime·mainPC+0(SB)/8,$runtime·main<ABIInternal>(SB)
GLOBL runtime·mainPC(SB),RODATA,$8
TEXT runtime·breakpoint(SB),NOSPLIT|NOFRAME,$0-0
MOVD R0, 0(R0) // TODO: TD
TW $31, R0, R0
RET
TEXT runtime·asminit(SB),NOSPLIT|NOFRAME,$0-0