From cd28ca3a4e130c88dd8f2d198050620b11d22ce4 Mon Sep 17 00:00:00 2001 From: Michael Anthony Knyszek Date: Tue, 4 May 2021 16:00:08 +0000 Subject: runtime: abort when receiving a signal on a non-Go thread on Windows Currently if a signal lands on a non-Go thread that's handled by the Go handler, Go will emit a message. However, unlike everywhere else in the runtime, Go will not abort the process after, and the signal handler will try to continue executing. This leads to cascading failures and possibly even memory corruption. For #45638. Change-Id: I546f4e82f339d555bed295528d819ac883b92bc6 Reviewed-on: https://go-review.googlesource.com/c/go/+/316809 Trust: Michael Knyszek Run-TryBot: Michael Knyszek Reviewed-by: Cherry Zhang --- src/runtime/sys_windows_arm.s | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/runtime/sys_windows_arm.s') diff --git a/src/runtime/sys_windows_arm.s b/src/runtime/sys_windows_arm.s index 189d2f6780..48f8c7dedf 100644 --- a/src/runtime/sys_windows_arm.s +++ b/src/runtime/sys_windows_arm.s @@ -97,8 +97,8 @@ TEXT runtime·badsignal2(SB),NOSPLIT|NOFRAME,$0 MOVW runtime·_WriteFile(SB), R12 BL (R12) - MOVW R4, R13 // restore SP - MOVM.IA.W (R13), [R4, R15] // pop {r4, pc} + // Does not return. + B runtime·abort(SB) TEXT runtime·getlasterror(SB),NOSPLIT,$0 MRC 15, 0, R0, C13, C0, 2 -- cgit v1.3-5-g9baa