We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35c7234 commit bd580a0Copy full SHA for bd580a0
src/runtime/debug.go
@@ -95,3 +95,22 @@ func mayMoreStackPreempt() {
95
g.stackguard0 = stackPreempt
96
}
97
98
+
99
+// mayMoreStackMove is a maymorestack hook that forces stack movement
100
+// at every possible point.
101
+//
102
+// See mayMoreStackPreempt.
103
104
+//go:nosplit
105
+//go:linkname mayMoreStackMove
106
+func mayMoreStackMove() {
107
+ // Don't do anything on the g0 or gsignal stack.
108
+ g := getg()
109
+ if g == g.m.g0 || g == g.m.gsignal {
110
+ return
111
+ }
112
+ // Force stack movement, unless the stack is already poisoned.
113
+ if g.stackguard0 < stackPoisonMin {
114
+ g.stackguard0 = stackForceMove
115
116
+}
0 commit comments