Commit cc7bbb0a authored by Shenghou Ma's avatar Shenghou Ma Committed by Russ Cox
Browse files

[release-branch.go1.4] runtime: ignore SIGPROF to foreign threads before...

[release-branch.go1.4] runtime: ignore SIGPROF to foreign threads before cgocallback is fully initialized

Some libraries, for example, OpenBLAS, create work threads in a global constructor.
If we're doing cpu profiling, it's possible that SIGPROF might come to some of the
worker threads before we make our first cgo call. Cgocallback used to terminate the
process when that happens, but it's better to miss a couple profiling signals than
to abort in this case.

Fixes #9456.

Change-Id: I112b8e1a6e10e6cc8ac695a4b518c0f577309b6b
Reviewed-on: https://go-review.googlesource.com/2141


Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
(cherry picked from commit 5da9c8cd)
Reviewed-on: https://go-review.googlesource.com/2789


Reviewed-by: default avatarAndrew Gerrand <adg@golang.org>
parent 4482c7b1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment