]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove extraneous stackPreempt setting
authorDavid Crawshaw <crawshaw@golang.org>
Sun, 24 Sep 2017 14:48:18 +0000 (10:48 -0400)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 14 Feb 2018 15:27:11 +0000 (15:27 +0000)
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>
src/runtime/proc.go

index 2e958f7fc597b359a174da414fb9cd688d0005e9..f20e77eee552510bc124188389e56f6c6839c7cb 100644 (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--
 }