diff options
Diffstat (limited to 'src/runtime/sys_linux_arm.s')
| -rw-r--r-- | src/runtime/sys_linux_arm.s | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/runtime/sys_linux_arm.s b/src/runtime/sys_linux_arm.s index b8dc202d4c..8908b1bf23 100644 --- a/src/runtime/sys_linux_arm.s +++ b/src/runtime/sys_linux_arm.s @@ -279,12 +279,16 @@ noswitch: // so don't bother saving g. // When using cgo, we already saved g on TLS, also don't save // g here. + // Also don't save g if we are already on the signal stack. + // We won't get a nested signal. MOVB runtime·iscgo(SB), R6 CMP $0, R6 BNE nosaveg MOVW m_gsignal(R5), R6 // g.m.gsignal CMP $0, R6 BEQ nosaveg + CMP g, R6 + BEQ nosaveg MOVW (g_stack+stack_lo)(R6), R6 // g.m.gsignal.stack.lo MOVW g, (R6) @@ -353,12 +357,16 @@ noswitch: // so don't bother saving g. // When using cgo, we already saved g on TLS, also don't save // g here. + // Also don't save g if we are already on the signal stack. + // We won't get a nested signal. MOVB runtime·iscgo(SB), R6 CMP $0, R6 BNE nosaveg MOVW m_gsignal(R5), R6 // g.m.gsignal CMP $0, R6 BEQ nosaveg + CMP g, R6 + BEQ nosaveg MOVW (g_stack+stack_lo)(R6), R6 // g.m.gsignal.stack.lo MOVW g, (R6) |
