]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1.3] runtime: ignore exceptions from foreign threads.
authorAndrew Gerrand <adg@golang.org>
Tue, 12 Aug 2014 04:07:22 +0000 (14:07 +1000)
committerAndrew Gerrand <adg@golang.org>
Tue, 12 Aug 2014 04:07:22 +0000 (14:07 +1000)
««« CL 104200046 / 14683b1cf2cc
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
»»»

LGTM=alex.brainman, minux
R=rsc, alex.brainman, minux
CC=golang-codereviews
https://golang.org/cl/126010043

src/pkg/runtime/sys_windows_386.s
src/pkg/runtime/sys_windows_amd64.s

index e0c0631cfc177f2e340d39d5fe597bf929f39df8..576831d2ccdf6a39dc2bc4cc618a1c1edf52c2a2 100644 (file)
@@ -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
index 94845903edc94bc1e209d03bee8187d8f23b5a2c..d161be6a50e69a5835157e9c7cff375cc7920d40 100644 (file)
@@ -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