aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloca
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-30 18:34:15 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-30 18:34:35 +0100
commitafa88a76c1d8525c21634927e7115f45f62a8623 (patch)
tree1568f5f22fa695cdc87f046ac9687653ff4de6b8 /src/alloca
parentneedstack: forgot to set the mask (diff)
downloadslibc-afa88a76c1d8525c21634927e7115f45f62a8623.tar.gz
slibc-afa88a76c1d8525c21634927e7115f45f62a8623.tar.bz2
slibc-afa88a76c1d8525c21634927e7115f45f62a8623.tar.xz
needstack: We cannot protect ourself from death by SIGSEGV, the CPU would halt and catch fire.
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'src/alloca')
-rw-r--r--src/alloca/needstack.c2
1 files changed, 2 insertions, 0 deletions
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;