Forward-ported from cl/51330448 (from cl/38429-p2).
(ppluzhnikov, google-local)
+include/alloca.h
+ Set __MAX_ALLOCA_CUTOFF to 8kb to avoid stack overflow, as described in
+ b/2425017. The stack protection in //google3/thread/thread.cc creates a
+ large stack with only 64kb of remaining space, which the upstream alloca
+ heuristic is ill-equipped to deal with.
+ Forward-ported from cl/51331379 (from cl/38559-p2).
+ (ppluzhnikov, google-local)
+
extern int __libc_alloca_cutoff (size_t size) __attribute__ ((const));
libc_hidden_proto (__libc_alloca_cutoff)
-#define __MAX_ALLOCA_CUTOFF 65536
+#define __MAX_ALLOCA_CUTOFF 8192
#include <allocalim.h>