This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Problem with stack size in pthreads
On Mon, Jul 16, 2001 at 12:29:21AM -0700, Ulrich Drepper wrote:
> Actually, I think the constructor should call
> __pthread_init_max_stacksize. Otherwise it could have been already
> too late to limit the stack size. Please check the patch I've just
> checked in.
>
It is similar to my first patch:
http://sources.redhat.com/ml/libc-alpha/2001-07/msg00223.html
It will cause posix/tst-regex to fail:
# ldd posix/tst-regex
librt.so.1 => /lib/librt.so.1 (0x40024000)
libc.so.6 => /lib/libc.so.6 (0x40036000)
libpthread.so.0 => /lib/libpthread.so.0 (0x40168000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
With your patch, all programs linked with librt will have the 2MB stack
limit. For the initial thread, the limit is not necessary. My second
patch tries to call __pthread_init_max_stacksize when we know the
stack limit will make a difference:
http://sources.redhat.com/ml/libc-alpha/2001-07/msg00224.html
It may not be the best approach, but posix/tst-regex works.
H.J.