aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-30 18:23:25 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-30 18:23:25 +0100
commit79a1c8a582ef0eac10fce9b9be94093a1549d80a (patch)
tree3e74e958f48457e7e57163d273a23265e675a802
parentneedstack: use pthread_sigmask rather than sigprocmask (diff)
downloadslibc-79a1c8a582ef0eac10fce9b9be94093a1549d80a.tar.gz
slibc-79a1c8a582ef0eac10fce9b9be94093a1549d80a.tar.bz2
slibc-79a1c8a582ef0eac10fce9b9be94093a1549d80a.tar.xz
needstack: forgot to set the mask
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
-rw-r--r--src/alloca/needstack.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/alloca/needstack.c b/src/alloca/needstack.c
index 9fce7c2..149914c 100644
--- a/src/alloca/needstack.c
+++ b/src/alloca/needstack.c
@@ -54,6 +54,9 @@ int stack_will_overflow(intptr_t n)
sigset_t new_mask;
void* old_sigsegv_handler;
+ if (sigemptyset(&new_mask) || sigaddset(&new_mask, SIGSEGV))
+ return 1;
+
old_sigsegv_handler = signal(SIGSEGV, SIG_DFL);
if (old_sigsegv_handler == SIG_ERR)
return 1;