aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorienkovic <ilya.enkovich@intel.com>2012-12-25 15:16:28 +0400
committerLiubov Dmitrieva <ldmitrie@sourceware.org>2013-10-23 19:07:37 +0400
commit5fb331d20bb10ce4cb19734728bf51d28dde42b8 (patch)
tree1a614784c1dde716c8279f0d22909ce8cfffc41a
parentf93ec08c4a30887c516ea7a6d4c2d8af8d541e03 (diff)
downloadglibc-5fb331d20bb10ce4cb19734728bf51d28dde42b8.zip
glibc-5fb331d20bb10ce4cb19734728bf51d28dde42b8.tar.gz
glibc-5fb331d20bb10ce4cb19734728bf51d28dde42b8.tar.bz2
Do not block SIGSEGV signal because Intel MPX runtime uses it.
-rw-r--r--nptl/sysdeps/pthread/gai_misc.h6
-rw-r--r--nptl/sysdeps/unix/sysv/linux/aio_misc.h6
-rw-r--r--nptl/sysdeps/unix/sysv/linux/mq_notify.c3
-rw-r--r--nptl/sysdeps/unix/sysv/linux/timer_routines.c3
-rw-r--r--nptl/tst-cancel7.c3
-rw-r--r--nptl/tst-signal1.c3
-rw-r--r--nptl/tst-signal2.c3
-rw-r--r--nptl/tst-signal3.c6
-rw-r--r--sysdeps/posix/profil.c3
-rw-r--r--sysdeps/posix/sigwait.c6
-rw-r--r--sysdeps/posix/sprofil.c3
11 files changed, 45 insertions, 0 deletions
diff --git a/nptl/sysdeps/pthread/gai_misc.h b/nptl/sysdeps/pthread/gai_misc.h
index 6026085..46305ca 100644
--- a/nptl/sysdeps/pthread/gai_misc.h
+++ b/nptl/sysdeps/pthread/gai_misc.h
@@ -82,6 +82,9 @@ __gai_start_notify_thread (void)
sigset_t ss;
sigemptyset (&ss);
INTERNAL_SYSCALL_DECL (err);
+#ifdef __CHKP__
+ __sigdelset(&ss, SIGSEGV);
+#endif
INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &ss, NULL, _NSIG / 8);
}
@@ -106,6 +109,9 @@ __gai_create_helper_thread (pthread_t *threadp, void *(*tf) (void *),
sigset_t oss;
sigfillset (&ss);
INTERNAL_SYSCALL_DECL (err);
+#ifdef __CHKP__
+ __sigdelset(&ss, SIGSEGV);
+#endif
INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &ss, &oss, _NSIG / 8);
int ret = pthread_create (threadp, &attr, tf, arg);
diff --git a/nptl/sysdeps/unix/sysv/linux/aio_misc.h b/nptl/sysdeps/unix/sysv/linux/aio_misc.h
index 2649dc1..3994f98 100644
--- a/nptl/sysdeps/unix/sysv/linux/aio_misc.h
+++ b/nptl/sysdeps/unix/sysv/linux/aio_misc.h
@@ -32,6 +32,9 @@ __aio_start_notify_thread (void)
sigset_t ss;
sigemptyset (&ss);
INTERNAL_SYSCALL_DECL (err);
+#ifdef __CHKP__
+ __sigdelset(&ss, SIGSEGV);
+#endif
INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &ss, NULL, _NSIG / 8);
}
@@ -54,6 +57,9 @@ __aio_create_helper_thread (pthread_t *threadp, void *(*tf) (void *),
sigset_t oss;
sigfillset (&ss);
INTERNAL_SYSCALL_DECL (err);
+#ifdef __CHKP__
+ __sigdelset(&ss, SIGSEGV);
+#endif
INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &ss, &oss, _NSIG / 8);
int ret = pthread_create (threadp, &attr, tf, arg);
diff --git a/nptl/sysdeps/unix/sysv/linux/mq_notify.c b/nptl/sysdeps/unix/sysv/linux/mq_notify.c
index 6bc34ba..b9250df 100644
--- a/nptl/sysdeps/unix/sysv/linux/mq_notify.c
+++ b/nptl/sysdeps/unix/sysv/linux/mq_notify.c
@@ -78,6 +78,9 @@ change_sigmask (int how, sigset_t *oss)
{
sigset_t ss;
sigfillset (&ss);
+#ifdef __CHKP__
+ sigdelset (&ss, SIGSEGV);
+#endif
return pthread_sigmask (how, &ss, oss);
}
diff --git a/nptl/sysdeps/unix/sysv/linux/timer_routines.c b/nptl/sysdeps/unix/sysv/linux/timer_routines.c
index 57f115f..1979adc 100644
--- a/nptl/sysdeps/unix/sysv/linux/timer_routines.c
+++ b/nptl/sysdeps/unix/sysv/linux/timer_routines.c
@@ -174,6 +174,9 @@ __start_helper_thread (void)
sigset_t oss;
sigfillset (&ss);
__sigaddset (&ss, SIGCANCEL);
+#ifdef __CHKP__
+ __sigdelset (&ss, SIGSEGV);
+#endif
INTERNAL_SYSCALL_DECL (err);
INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &ss, &oss, _NSIG / 8);
diff --git a/nptl/tst-cancel7.c b/nptl/tst-cancel7.c
index ad40b9c..7e8a860 100644
--- a/nptl/tst-cancel7.c
+++ b/nptl/tst-cancel7.c
@@ -65,6 +65,9 @@ sl (void)
sigset_t ss;
sigfillset (&ss);
+#ifdef __CHKP__
+ sigdelset (&ss, SIGSEGV);
+#endif
sigsuspend (&ss);
exit (0);
}
diff --git a/nptl/tst-signal1.c b/nptl/tst-signal1.c
index 81dd161..0345701 100644
--- a/nptl/tst-signal1.c
+++ b/nptl/tst-signal1.c
@@ -68,6 +68,9 @@ receiver (void)
sigfillset (&ss);
+#ifdef __CHKP__
+ sigdelset(&ss, SIGSEGV);
+#endif
if (pthread_sigmask (SIG_SETMASK, &ss, NULL) != 0)
{
puts ("1st pthread_sigmask failed");
diff --git a/nptl/tst-signal2.c b/nptl/tst-signal2.c
index 87f3bb8..23cda43 100644
--- a/nptl/tst-signal2.c
+++ b/nptl/tst-signal2.c
@@ -71,6 +71,9 @@ receiver (void)
alarm (10);
sigfillset (&ss);
+#ifdef __CHKP__
+ sigdelset(&ss, SIGSEGV);
+#endif
if (pthread_sigmask (SIG_SETMASK, &ss, NULL) != 0)
{
diff --git a/nptl/tst-signal3.c b/nptl/tst-signal3.c
index fc34f66..ae5fea6 100644
--- a/nptl/tst-signal3.c
+++ b/nptl/tst-signal3.c
@@ -96,6 +96,9 @@ do_test (void)
/* Block all signals. */
sigset_t ss;
sigfillset (&ss);
+#ifdef __CHKP__
+ sigdelset(&ss, SIGSEGV);
+#endif
th_main = pthread_self ();
@@ -118,6 +121,9 @@ do_test (void)
};
sigfillset (&sa.sa_mask);
+#ifdef __CHKP__
+ sigdelset(&ss, SIGSEGV);
+#endif
if (sigaction (sig0 + i, &sa, NULL) != 0)
{
printf ("sigaction for signal %d failed\n", i);
diff --git a/sysdeps/posix/profil.c b/sysdeps/posix/profil.c
index 86d36a9..28613af 100644
--- a/sysdeps/posix/profil.c
+++ b/sysdeps/posix/profil.c
@@ -106,6 +106,9 @@ __profil (u_short *sample_buffer, size_t size, size_t offset, u_int scale)
act.sa_handler = (sighandler_t) &profil_counter;
act.sa_flags = SA_RESTART;
__sigfillset (&act.sa_mask);
+#ifdef __CHKP__
+ __sigdelset (&act.sa_mask, SIGSEGV);
+#endif
if (__sigaction (SIGPROF, &act, oact_ptr) < 0)
return -1;
diff --git a/sysdeps/posix/sigwait.c b/sysdeps/posix/sigwait.c
index b0ea14d..a980647 100644
--- a/sysdeps/posix/sigwait.c
+++ b/sysdeps/posix/sigwait.c
@@ -42,11 +42,17 @@ do_sigwait (const sigset_t *set, int *sig)
/* Prepare set. */
__sigfillset (&tmp_mask);
+#ifdef __CHKP__
+ __sigdelset (&tmp_mask, SIGSEGV):
+#endif
/* Unblock all signals in the SET and register our nice handler. */
action.sa_handler = ignore_signal;
action.sa_flags = 0;
__sigfillset (&action.sa_mask); /* Block all signals for handler. */
+#ifdef __CHKP__
+ __sigdelset (&action.sa_mask, SIGSEGV):
+#endif
/* Make sure we recognize error conditions by setting WAS_SIG to a
value which does not describe a legal signal number. */
diff --git a/sysdeps/posix/sprofil.c b/sysdeps/posix/sprofil.c
index 1447a4f..42c43cd 100644
--- a/sysdeps/posix/sprofil.c
+++ b/sysdeps/posix/sprofil.c
@@ -339,6 +339,9 @@ __sprofil (struct prof *profp, int profcnt, struct timeval *tvp,
act.sa_handler = (sighandler_t) &profil_counter_ushort;
act.sa_flags = SA_RESTART;
__sigfillset (&act.sa_mask);
+#ifdef __CHKP__
+ __sigdelset (&act.sa_mask, SIGSEGV);
+#endif
if (__sigaction (SIGPROF, &act, &prof_info.saved_action) < 0)
return -1;