]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Set __MAX_ALLOCA_CUTOFF to 8kb to avoid stack overflow, as described in b/2425017.
authorPaul Pluzhnikov <ppluzhnikov@google.com>
Sat, 1 Mar 2014 01:08:18 +0000 (17:08 -0800)
committerPaul Pluzhnikov <ppluzhnikov@google.com>
Sat, 1 Mar 2014 01:08:18 +0000 (17:08 -0800)
README.google
include/alloca.h

index 9bc2cf9b52e7e9df8a9616e365e2859c10336f5d..78cca4cdbc26a1006f48c7e08517e43774f18de3 100644 (file)
@@ -112,3 +112,11 @@ elf/dl-debug.c
   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) 
+
index f741d25d5479fde3b8db0e232c0bd20c7291882f..606bca3d9b6d00cffb1957f59a76a1a03942ddb6 100644 (file)
@@ -16,7 +16,7 @@ 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
+#define __MAX_ALLOCA_CUTOFF    8192
 
 #include <allocalim.h>