[Gc] GC_thread_exit_proc error on win32_threads.c

Tommaso Tagliapietra (EXT VE SYS) tommaso.tagliapietra at enel.it
Mon May 29 02:23:42 PDT 2006

In a Pentium4 2.6Ghz with WindowsXP Professional SP2, I have a problem with the release 6.4 of the garbage collector under Cygwin, and probably with other releases of the collector.  It seems that at the end of GC_thread_exit_proc (win32_threads.c module), sometimes my program exit with a Segmentation Fault. I'm sure that there is not my code the problem and probably not the Garbage Collector too. However I've resolved the problem adding a "Sleep(10);" at the end of the function:

void GC_thread_exit_proc(void *arg)
    GC_thread me = (GC_thread)arg;

      GC_printf2("thread 0x%x(0x%x) called pthread_exit().\n",
                 (int)pthread_self(), GetCurrentThreadId());
#   endif

    if (me -> flags & DETACHED) {
    } else {
      /* deallocate it as part of join */
      me -> flags |= FINISHED;

The same problem doesn't not happen into a P4 2Ghz WindowsXP Professional SP2. Same compiler. Why this stupid change works without segmentation fault? Can be some race conditions the reason?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://napali.hpl.hp.com/pipermail/gc/attachments/20060529/281af915/attachment.htm

More information about the Gc mailing list