linamh/sys-libs/glibc/files/2.3.2/glibc-2.3.2-signal-ssp.diff
2009-09-12 08:46:08 +00:00

41 lines
1.4 KiB
Diff

--- ./sysdeps/unix/sysv/linux/ssp.c.orig 2004-01-23 19:54:19.000000000 -0500
+++ ./sysdeps/unix/sysv/linux/ssp.c 2004-01-23 19:56:34.000000000 -0500
@@ -52,8 +52,8 @@
{
sigset_t mask;
sigfillset(&mask);
- sigdelset(&mask, SIGABRT); /* Block all signal handlers */
- sigprocmask(SIG_BLOCK, &mask, NULL); /* except SIGABRT */
+ sigdelset(&mask, SIGSEGV); /* Block all signal handlers */
+ sigprocmask(SIG_BLOCK, &mask, NULL); /* except SIGSEGV */
}
#endif
@@ -65,6 +65,7 @@
if (bufsz>len) {strncat(buf, func, bufsz-len-1); len = strlen(buf);}
/* print error message */
write (STDERR_FILENO, buf+3, len-3);
+ write (STDERR_FILENO, "()\n", 3);
#if defined(HAVE_SYSLOG)
if ((LogFile = socket(AF_UNIX, SOCK_DGRAM, 0)) != -1) {
@@ -81,15 +82,15 @@
#endif
#ifdef _POSIX_SOURCE
- { /* Make sure the default handler is associated with SIGABRT */
+ { /* Make sure the default handler is associated with SIGSEGV */
struct sigaction sa;
memset(&sa, 0, sizeof(struct sigaction));
sigfillset(&sa.sa_mask); /* Block all signals */
sa.sa_flags = 0;
sa.sa_handler = SIG_DFL;
- sigaction(SIGABRT, &sa, NULL);
- (void)kill(getpid(), SIGABRT);
+ sigaction(SIGSEGV, &sa, NULL);
+ (void)kill(getpid(), SIGSEGV);
}
#endif
_exit(127);