summaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2013-07-23 04:42:09 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2013-07-23 04:42:09 +0000
commit3498b414fef5ad852f6f1feb4ab22b8e7529186b (patch)
treecec25b76a29bb0eee3093c06dc1f16e49b741531 /libgo
parent7aa04c8dccb843c102612936b7fbb888e9fdf13f (diff)
downloadgcc-3498b414fef5ad852f6f1feb4ab22b8e7529186b.tar.gz
runtime: Ignore SIGPROF if not on a Go thread.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201154 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo')
-rw-r--r--libgo/runtime/go-signal.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c
index 1e800578ffa..9771b71cfcf 100644
--- a/libgo/runtime/go-signal.c
+++ b/libgo/runtime/go-signal.c
@@ -166,21 +166,22 @@ runtime_sighandler (int sig, Siginfo *info,
int i;
m = runtime_m ();
- if (m == NULL)
- {
- runtime_badsignal (sig);
- return;
- }
#ifdef SIGPROF
if (sig == SIGPROF)
{
- if (gp != runtime_m ()->g0 && gp != runtime_m ()->gsignal)
+ if (m != NULL && gp != m->g0 && gp != m->gsignal)
runtime_sigprof ();
return;
}
#endif
+ if (m == NULL)
+ {
+ runtime_badsignal (sig);
+ return;
+ }
+
for (i = 0; runtime_sigtab[i].sig != -1; ++i)
{
SigTab *t;