diff options
Diffstat (limited to 'src/runtime/proc.go')
-rw-r--r-- | src/runtime/proc.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go index eaea523ab5..0425aede23 100644 --- a/src/runtime/proc.go +++ b/src/runtime/proc.go @@ -2186,6 +2186,14 @@ func dropm() { setg(nil) + // Clear g0 stack bounds to ensure that needm always refreshes the + // bounds when reusing this M. + g0 := mp.g0 + g0.stack.hi = 0 + g0.stack.lo = 0 + g0.stackguard0 = 0 + g0.stackguard1 = 0 + putExtraM(mp) msigrestore(sigmask) |