Problem with stack size in pthreads
Andreas Jaeger
aj@suse.de
Thu Jul 12 04:29:00 GMT 2001
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
More information about the Libc-alpha
mailing list