]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Reduce __MAX_ALLOCA_CUTOFF to 8192
authorStan Shebs <stanshebs@google.com>
Tue, 8 Oct 2019 21:30:43 +0000 (14:30 -0700)
committerFangrui Song <i@maskray.me>
Sat, 28 Aug 2021 00:26:02 +0000 (17:26 -0700)
include/alloca.h

index fd90664f0a17cd6df5f1d82eaa79c89c24f35b25..900e744a416765ae2e930022e3e7cf37576fd2e3 100644 (file)
@@ -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 <allocalim.h>