From afa88a76c1d8525c21634927e7115f45f62a8623 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 30 Dec 2015 18:34:15 +0100 Subject: needstack: We cannot protect ourself from death by SIGSEGV, the CPU would halt and catch fire. 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 | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/alloca') diff --git a/src/alloca/needstack.c b/src/alloca/needstack.c index 149914c..094b3ad 100644 --- a/src/alloca/needstack.c +++ b/src/alloca/needstack.c @@ -58,6 +58,8 @@ int stack_will_overflow(intptr_t n) return 1; old_sigsegv_handler = signal(SIGSEGV, SIG_DFL); + /* Sorry, we cannot have a signal handler, the OS kernel + * will make the CPU halt and catch fire until we die. */ if (old_sigsegv_handler == SIG_ERR) return 1; -- cgit v1.2.3-70-g09d2