This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Problem with stack size in pthreads



I got a bug report with threads and JDK.  The problem seems to be that
the stack of the initial thread is growing larger than expected.  If
the stack pointer of the initial thread in function thread_self (from
internals.h) is below __pthread_initial_thread_bos, it's not
considered in the initial thread.

__pthread_initial_thread_bos is set to 2 * 2MB below the current stack
pointer aligned to a 2 MB (2MB = STACK_SIZE)  boundary in
pthread_initialize (pthread.c).

What's the right way to fix this?  AFAIU the initial thread can be
unlimited and has therefore no limits.

Btw. this works when THREAD_SELF is defined, e.g with i686 using LDTs.

Thanks to Hui for the analysis of the problem,
Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]