aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/runtime/mstkbar.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/runtime/mstkbar.go b/src/runtime/mstkbar.go
index 6b4fc8d4a6..7d7235d259 100644
--- a/src/runtime/mstkbar.go
+++ b/src/runtime/mstkbar.go
@@ -305,7 +305,9 @@ func nextBarrierPC() uintptr {
//go:nosplit
func setNextBarrierPC(pc uintptr) {
gp := getg()
+ gcLockStackBarriers(gp)
gp.stkbar[gp.stkbarPos].savedLRVal = pc
+ gcUnlockStackBarriers(gp)
}
// gcLockStackBarriers synchronizes with tracebacks of gp's stack