[Gc] GC crash on OSX 10.3.1 (7C103)

Brian Alliet brian@brian-web.com
Tue, 11 Nov 2003 16:40:16 -0500

Andrew Begel wrote:
> And now I've narrowed down the bug to the logic failure. The
> GC_thr_init() function in pthread_support.c assumes it is running from
> the main thread

I think every pthreads based platform makes this assumption. To fix the
problem you'd need to find a way to get the address of the bottom of the
stack of a pthread. I don't think there is any portable way to do this but
there probably are OS specific ways. This is easy if we just assume we're
being called from the main thread because its stack bottom is always the

If you could figue out how to:
a) Tell if we're running from the main thread or a pthread_create created
b) Find stack bottom for a pthread
I could probably get this to work for you (these two will probably be
darwin/os x specific).

Could you do me a favor and try running "make test" from the gc dist? Be
sure thats working before trying to do weird things like initializing the gc
from outside the main thread.