1
0
mirror of https://github.com/golang/go synced 2024-10-02 02:18:33 -06:00

runtime: remove extraneous stackPreempt setting

The stackguard is set to stackPreempt earlier in reentersyscall, and
as it comes with throwsplit = true there's no way for the stackguard
to be set to anything else by the end of reentersyscall.

Change-Id: I4e942005b22ac784c52398c74093ac887fc8ec24
Reviewed-on: https://go-review.googlesource.com/65673
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
This commit is contained in:
David Crawshaw 2017-09-24 10:48:18 -04:00 committed by Brad Fitzpatrick
parent ebb77aa867
commit b03f1d1a7e

View File

@ -2824,10 +2824,6 @@ func reentersyscall(pc, sp uintptr) {
save(pc, sp)
}
// Goroutines must not split stacks in Gsyscall status (it would corrupt g->sched).
// We set _StackGuard to StackPreempt so that first split stack check calls morestack.
// Morestack detects this case and throws.
_g_.stackguard0 = stackPreempt
_g_.m.locks--
}