diff options
author | Andrew Gerrand <adg@golang.org> | 2014-08-12 14:07:22 +1000 |
---|---|---|
committer | Andrew Gerrand <adg@golang.org> | 2014-08-12 14:07:22 +1000 |
commit | 3a1394aca87af237f7fcd55096422f4143dc1b47 (patch) | |
tree | 451014203bb737b11637422ef4c8985de42a48b4 | |
parent | 2cfe73640f401087e735f08e19ecb0ac524ec910 (diff) | |
download | go-3a1394aca87af237f7fcd55096422f4143dc1b47.tar.gz |
[release-branch.go1.3] runtime: ignore exceptions from foreign threads.
??? CL 104200046 / 14683b1cf2cc
runtime: ignore exceptions from foreign threads.
Fixes issue 8224.
LGTM=alex.brainman, rsc
R=alex.brainman, rsc, dave
CC=golang-codereviews
https://codereview.appspot.com/104200046
???
LGTM=alex.brainman, minux
R=rsc, alex.brainman, minux
CC=golang-codereviews
https://codereview.appspot.com/126010043
-rw-r--r-- | src/pkg/runtime/sys_windows_386.s | 5 | ||||
-rw-r--r-- | src/pkg/runtime/sys_windows_amd64.s | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/pkg/runtime/sys_windows_386.s b/src/pkg/runtime/sys_windows_386.s index e0c0631cf..576831d2c 100644 --- a/src/pkg/runtime/sys_windows_386.s +++ b/src/pkg/runtime/sys_windows_386.s @@ -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 m(DX), AX CMPL AX, $0 JNE 2(PC) @@ -100,6 +104,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 diff --git a/src/pkg/runtime/sys_windows_amd64.s b/src/pkg/runtime/sys_windows_amd64.s index 94845903e..d161be6a5 100644 --- a/src/pkg/runtime/sys_windows_amd64.s +++ b/src/pkg/runtime/sys_windows_amd64.s @@ -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 m(DX), AX CMPQ AX, $0 JNE 2(PC) @@ -132,6 +136,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 |