about summary refs log tree commit diff
path: root/nptl/tst-tls3-malloc.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2016-08-16 11:06:13 +0200
committerFlorian Weimer <fweimer@redhat.com>2016-08-16 11:06:13 +0200
commitfc86a87d788596c6d418f0fa79c79fffc6cfd08f (patch)
tree384b66db04365575e9c6c48eb63148b98c289f67 /nptl/tst-tls3-malloc.c
parent9e2ff6c9cc54c0b4402b8d49e4abe7000fde7617 (diff)
downloadglibc-fc86a87d788596c6d418f0fa79c79fffc6cfd08f.tar.gz
glibc-fc86a87d788596c6d418f0fa79c79fffc6cfd08f.tar.xz
glibc-fc86a87d788596c6d418f0fa79c79fffc6cfd08f.zip
nptl/tst-tls3-malloc: Force freeing of thread stacks
It turns out that due to the reduced stack size in tst-tls3 and the
(fixed) default stack cache size, allocated TLS variables are never
freed, so the test coverage for tst-tls3-malloc is less than complete.
This change increases the thread stack size for tst-tls3-malloc only,
to make sure thread stacks and TLS variables are freed.
Diffstat (limited to 'nptl/tst-tls3-malloc.c')
-rw-r--r--nptl/tst-tls3-malloc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/nptl/tst-tls3-malloc.c b/nptl/tst-tls3-malloc.c
index 5eab3cdbb4..8a580fa789 100644
--- a/nptl/tst-tls3-malloc.c
+++ b/nptl/tst-tls3-malloc.c
@@ -19,6 +19,11 @@
 /* Reuse the test.  */
 #include "tst-tls3.c"
 
+/* Increase the thread stack size to 10 MiB, so that some thread
+   stacks are actually freed.  (The stack cache size is currently
+   hard-wired to 40 MiB in allocatestack.c.)  */
+static long stack_size_in_mb = 10;
+
 #include <sys/mman.h>
 
 /* Interpose a minimal malloc implementation.  This implementation