This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Fix manythreads test case on s390
- From: Ulrich Weigand <weigand at i1 dot informatik dot uni-erlangen dot de>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 23 Apr 2004 18:33:48 +0200 (CEST)
- Subject: [PATCH] Fix manythreads test case on s390
Hello,
the new manythreads.c test case fails on s390 when using NPTL,
because it tries to create 256 threads with default thread stack
size (which happens to be 8MB for NPTL). This is hard to do
when the total address space size is 2 GB...
This can be fixed by using pthread_addr_setstacksize to reduce
the thread stack size.
Bye,
Ulrich
ChangeLog:
* gdb.threads/manythreads.c: Reduce thread stack size.
Index: gdb/testsuite/gdb.threads/manythreads.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/manythreads.c,v
retrieving revision 1.1
diff -c -p -r1.1 manythreads.c
*** gdb/testsuite/gdb.threads/manythreads.c 22 Apr 2004 22:19:40 -0000 1.1
--- gdb/testsuite/gdb.threads/manythreads.c 23 Apr 2004 16:15:20 -0000
*************** main (int argc, char **argv)
*** 19,24 ****
--- 19,25 ----
int i, j;
pthread_attr_init (&attr);
+ pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN);
/* Create a ton of quick-executing threads, then wait for them to
complete. */
--
Dr. Ulrich Weigand
weigand@informatik.uni-erlangen.de