]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.4] runtime: ignore SIGPROF to foreign threads before cgocallback...
authorShenghou Ma <minux@golang.org>
Sun, 28 Dec 2014 00:15:38 +0000 (19:15 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 14 Jan 2015 05:25:22 +0000 (05:25 +0000)
commitcc7bbb0ae9cb34170fa9b53ca7accbe1b80fece4
tree524101c8d3d185217c2c71388105978db0af6bf4
parent4482c7b1a1ad3a7dd31f6b6cd26fcfd2758743d9
[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: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit 5da9c8cd0a0427d1771b3a9a6d8d931430ce50dd)
Reviewed-on: https://go-review.googlesource.com/2789
Reviewed-by: Andrew Gerrand <adg@golang.org>
src/runtime/crash_cgo_test.go
src/runtime/sigqueue.go