Commit a1778ec1 authored by Shenghou Ma's avatar Shenghou Ma

runtime: ignore exceptions from foreign threads.

Fixes #8224.

LGTM=alex.brainman, rsc
R=alex.brainman, rsc, dave
CC=golang-codereviews
https://golang.org/cl/104200046
parent 76ce843a
......@@ -88,6 +88,10 @@ TEXT runtime·sigtramp(SB),NOSPLIT,$0-0
// fetch g
get_tls(DX)
CMPL DX, $0
JNE 3(PC)
MOVL $0, AX // continue
JMP done
MOVL g(DX), DX
CMPL DX, $0
JNE 2(PC)
......@@ -99,6 +103,7 @@ TEXT runtime·sigtramp(SB),NOSPLIT,$0-0
CALL runtime·sighandler(SB)
// AX is set to report result back to Windows
done:
// restore callee-saved registers
MOVL 24(SP), DI
MOVL 20(SP), SI
......
......@@ -120,6 +120,10 @@ TEXT runtime·sigtramp(SB),NOSPLIT,$0-0
// fetch g
get_tls(DX)
CMPQ DX, $0
JNE 3(PC)
MOVQ $0, AX // continue
JMP done
MOVQ g(DX), DX
CMPQ DX, $0
JNE 2(PC)
......@@ -131,6 +135,7 @@ TEXT runtime·sigtramp(SB),NOSPLIT,$0-0
CALL runtime·sighandler(SB)
// AX is set to report result back to Windows
done:
// restore registers as required for windows callback
MOVQ 24(SP), R15
MOVQ 32(SP), R14
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment