diff --git a/src/runtime/signal_unix.go b/src/runtime/signal_unix.go index 5e4361e7a1..6563186392 100644 --- a/src/runtime/signal_unix.go +++ b/src/runtime/signal_unix.go @@ -394,6 +394,7 @@ func sigtrampgo(sig uint32, info *siginfo, ctx unsafe.Pointer) { } c := &sigctxt{info, ctx} g := sigFetchG(c) + setg(g) if g == nil { if sig == _SIGPROF { sigprofNonGoPC(c.sigpc())