From 3a84f426fdd25e3a18c38f31ba8b41dbe0d55100 Mon Sep 17 00:00:00 2001 From: Stan Shebs Date: Tue, 8 Oct 2019 14:30:43 -0700 Subject: [PATCH] Reduce __MAX_ALLOCA_CUTOFF to 8192 --- include/alloca.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/alloca.h b/include/alloca.h index fd90664f0a1..900e744a416 100644 --- a/include/alloca.h +++ b/include/alloca.h @@ -19,7 +19,9 @@ extern int __libc_use_alloca (size_t size) __attribute__ ((const)); extern int __libc_alloca_cutoff (size_t size) __attribute__ ((const)); libc_hidden_proto (__libc_alloca_cutoff) -#define __MAX_ALLOCA_CUTOFF 65536 +/* Reduce from the usual 65536 so as to avoid stack overflow in situations where + threads have not been given much spare stack space. */ +#define __MAX_ALLOCA_CUTOFF 8192 #include -- 2.47.2