aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/cgocall.go2
-rw-r--r--src/runtime/runtime2.go2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime/cgocall.go b/src/runtime/cgocall.go
index debd8cf5e8..e4da34b31d 100644
--- a/src/runtime/cgocall.go
+++ b/src/runtime/cgocall.go
@@ -233,6 +233,7 @@ func callbackUpdateSystemStack(mp *m, sp uintptr, signal bool) {
g0.stack.hi = sp + 1024
g0.stack.lo = sp - 32*1024
g0.stackguard0 = g0.stack.lo + stackGuard
+ g0.stackguard1 = g0.stackguard0
print("M ", mp.id, " procid ", mp.procid, " runtime: cgocallback with sp=", hex(sp), " out of bounds [", hex(lo), ", ", hex(hi), "]")
print("\n")
@@ -271,6 +272,7 @@ func callbackUpdateSystemStack(mp *m, sp uintptr, signal bool) {
}
}
g0.stackguard0 = g0.stack.lo + stackGuard
+ g0.stackguard1 = g0.stackguard0
}
// Call from C back to Go. fn must point to an ABIInternal Go entry-point.
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go
index 8809b5d569..34f66d4ada 100644
--- a/src/runtime/runtime2.go
+++ b/src/runtime/runtime2.go
@@ -423,7 +423,7 @@ type g struct {
// stack describes the actual stack memory: [stack.lo, stack.hi).
// stackguard0 is the stack pointer compared in the Go stack growth prologue.
// It is stack.lo+StackGuard normally, but can be StackPreempt to trigger a preemption.
- // stackguard1 is the stack pointer compared in the C stack growth prologue.
+ // stackguard1 is the stack pointer compared in the //go:systemstack stack growth prologue.
// It is stack.lo+StackGuard on g0 and gsignal stacks.
// It is ~0 on other goroutine stacks, to trigger a call to morestackc (and crash).
stack stack // offset known to runtime/cgo