diff options
| author | qmuntal <quimmuntal@gmail.com> | 2022-10-14 17:30:45 +0200 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-10-19 20:21:26 +0000 |
| commit | 6fe3ccd74c4bf53552da3d9f59463a8a291f59db (patch) | |
| tree | c386d044d7a85df2ed856a812e2fb7ba140a3469 /src/runtime/sys_windows_arm.s | |
| parent | 4a164a44de3c67da878403504d948dfbd4fc6f7d (diff) | |
| download | go-6fe3ccd74c4bf53552da3d9f59463a8a291f59db.tar.xz | |
runtime: ignore exceptions from non-Go threads on windows arm/arm64
If there is no current G while handling an exception it means
the exception was originated in a non-Go thread.
The best we can do is ignore the exception and let it flow
through other vectored and structured error handlers.
I've removed badsignal2 from sigtramp because we can't really know
if the signal is bad or not, it might be handled later in the chain.
Fixes #50877
Updates #56082
Change-Id: Ica159eb843629986d1fb5482f0b59a9c1ed91698
Reviewed-on: https://go-review.googlesource.com/c/go/+/442896
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/runtime/sys_windows_arm.s')
| -rw-r--r-- | src/runtime/sys_windows_arm.s | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/runtime/sys_windows_arm.s b/src/runtime/sys_windows_arm.s index 5dc576a260..db6d8f1a08 100644 --- a/src/runtime/sys_windows_arm.s +++ b/src/runtime/sys_windows_arm.s @@ -123,8 +123,14 @@ TEXT sigtramp<>(SB),NOSPLIT|NOFRAME,$0 MOVW R1, R7 // Save param1 BL runtime·load_g(SB) - CMP $0, g // is there a current g? - BL.EQ runtime·badsignal2(SB) + CMP $0, g // is there a current g? + BNE g_ok + ADD $(8+20), R13 // free locals + MOVM.IA.W (R13), [R3, R4-R11, R14] // pop {r3, r4-r11, lr} + MOVW $0, R0 // continue + BEQ return + +g_ok: // save g and SP in case of stack switch MOVW R13, 24(R13) |
