aboutsummaryrefslogtreecommitdiff
path: root/libgo/go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2017-06-13 00:43:56 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2017-06-13 00:43:56 +0000
commitcd34e54306bfb2ef53fbb2405de435e375337ef9 (patch)
tree7eb733a5b30639c426714eac9d7dfeacc3b95c4f /libgo/go
parent67972c9038daa394086daeed5c332983fa92d583 (diff)
downloadgcc-cd34e54306bfb2ef53fbb2405de435e375337ef9.zip
gcc-cd34e54306bfb2ef53fbb2405de435e375337ef9.tar.gz
gcc-cd34e54306bfb2ef53fbb2405de435e375337ef9.tar.bz2
runtime: clear isSystemGoroutine in goexit
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
Diffstat (limited to 'libgo/go')
-rw-r--r--libgo/go/runtime/proc.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/libgo/go/runtime/proc.go b/libgo/go/runtime/proc.go
index 038f20e..32bc148 100644
--- a/libgo/go/runtime/proc.go
+++ b/libgo/go/runtime/proc.go
@@ -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