runtime: clear isSystemGoroutine in goexit
authorIan Lance Taylor <ian@gcc.gnu.org>
Tue, 13 Jun 2017 00:43:56 +0000 (00:43 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 13 Jun 2017 00:43:56 +0000 (00:43 +0000)
    Otherwise it may be set when the g struct is reused via gfput/gfget.

    Test is golang.org/x/net/http2 with GOMAXPROCS=12.

    Reviewed-on: https://go-review.googlesource.com/45430

From-SVN: r249143

gcc/go/gofrontend/MERGE
libgo/go/runtime/proc.go

index d4a312908f0ef14633e04fe9b19f5fffc76008d1..a2ed1f30ffe3c23bbb8960dd685df317ea48295b 100644 (file)
@@ -1,4 +1,4 @@
-908fc7e46ebe36658ed86b65a3d165fccb2e8576
+3b44ad058abda0d1b0b6c928987270da50ab7431
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
index 038f20e977ef4a8e51ae66ce8ecf7c9680917ddb..32bc14832b8d4d5092fa9676267d2d7961393d95 100644 (file)
@@ -2251,6 +2251,7 @@ func goexit0(gp *g) {
        casgstatus(gp, _Grunning, _Gdead)
        if isSystemGoroutine(gp) {
                atomic.Xadd(&sched.ngsys, -1)
+               gp.isSystemGoroutine = false
        }
        gp.m = nil
        gp.lockedm = nil