[Gc] Win32 infinite loop
Fri, 15 Aug 2003 13:30:21 +0100
I'm using GC 6.1 under Win32, built as a static library rather than a DLL.
I have arranged for my programs to call threadAttach() and
threadDetach() whenever threads are started / stopped.
I have used this arrangement in a large number of programs, and it has
been working quite well for me until now.
My problem is that in one of my programs the collector gets stuck
(apparently) inside GC_stopped_mark(). A typical stack trace if I break
into the program when it freezes looks like this:
GC_stopped_mark + 174 bytes
GC_try_to_collect_inner + 231 bytes
GC_try_to_collect + 76 bytes
GC_gcollect + 15 bytes
(there may be other functions above this in the list, but
GC_stopped_mark is always there).
I'm not certain as to what aspect of the program that causes the failure
is the important one. The failure happens repeatably, early during the
execution. The call to the garbage collector is a direct collection
because just beforehand a large object has been allocated which is
finished with at that point (a copy of an image file kept in memory for
Any idea what might be going on?