From 79a1c8a582ef0eac10fce9b9be94093a1549d80a Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 30 Dec 2015 18:23:25 +0100 Subject: needstack: forgot to set the mask MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/alloca/needstack.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2