diff --git a/src/runtime/mstkbar.go b/src/runtime/mstkbar.go index 6b4fc8d4a6a08..7d7235d259347 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