aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Anthony Knyszek <mknyszek@google.com>2019-10-14 17:33:36 +0000
committerDmitri Shuralyov <dmitshur@golang.org>2019-12-19 20:24:04 +0000
commitb0a2a817571c52341603d7d089c4138b048c67c3 (patch)
treea3bc3acdf9c2f9e8b595bd746e5b609b464fbe45
parente1df20edbb27c6fb273f530f1b4c6911c3b2e919 (diff)
downloadgo-b0a2a817571c52341603d7d089c4138b048c67c3.tar.gz
go-b0a2a817571c52341603d7d089c4138b048c67c3.zip
[release-branch.go1.13] runtime: call goready in wakeScavenger instead of ready
This changes fixes an oversight in wakeScavenger which would cause ready to be called off of the system stack. This change makes it so that wakeScavenger calls goready, which switches to the system stack before calling ready. Fixes #36127. Change-Id: Icb13f180b4d8fdd47c921eac1b896e3dd49e43b3 Reviewed-on: https://go-review.googlesource.com/c/go/+/200999 Run-TryBot: Michael Knyszek <mknyszek@google.com> Reviewed-by: Keith Randall <khr@golang.org> (cherry picked from commit 2c87be436bddd9b49f11959adee1ae817cb48ee1) Reviewed-on: https://go-review.googlesource.com/c/go/+/212103 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-rw-r--r--src/runtime/mgcscavenge.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/mgcscavenge.go b/src/runtime/mgcscavenge.go
index c4394a3d60..c71b3be7b2 100644
--- a/src/runtime/mgcscavenge.go
+++ b/src/runtime/mgcscavenge.go
@@ -233,7 +233,7 @@ func wakeScavenger() {
// Unpark the goroutine and tell it that there may have been a pacing
// change.
scavenge.parked = false
- ready(scavenge.g, 0, true)
+ goready(scavenge.g, 0)
}
unlock(&scavenge.lock)
}