This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: (glibc-2.0.7) c++ constructors and pthreads
Date: 18 Oct 1998 21:07:42 -0000
From: Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
> I have a crash case here for a program which has global c++
> constructors and links against linuxthreads, one of the c++
> constructors ends up calling malloc(), and this crashes because
> the pthread constructor has not run yet
That's strange, on the very first call, malloc() calls
ptmalloc_init() via the initial special hooks, which in turn calls
__pthread_initialize() if that symbol has been linked in. Can you
check why this is not working ?
Thank you for pointing this out.
It seems that even though libpthread has been brought in, at the time
ptmalloc_init() is called, __pthread_initialize is not resolved in
libc's GOT, it is still zero. So at this point it could be a Sparc
specific bug. I'll investigate further.
Later,
David S. Miller
davem@dm.cobaltmicro.com