aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/mgcmark.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/mgcmark.go')
-rw-r--r--src/runtime/mgcmark.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime/mgcmark.go b/src/runtime/mgcmark.go
index 2d0cbd203c..00b96fd00b 100644
--- a/src/runtime/mgcmark.go
+++ b/src/runtime/mgcmark.go
@@ -174,7 +174,9 @@ func markroot(gcw *gcWork, i uint32) {
// Only do this once per GC cycle; preferably
// concurrently.
if !work.markrootDone {
- markrootFreeGStacks()
+ // Switch to the system stack so we can call
+ // stackfree.
+ systemstack(markrootFreeGStacks)
}
case baseSpans <= i && i < baseStacks: