[Gc] infinite loop since 6.3alpha5

Paolo Molaro lupus at debian.org
Sat Jun 5 09:37:11 PDT 2004


It looks like gc 6.3alpha5 introduced a bug.
It was first found by running the mono testsuite, but a simple C program
gives the same results:

#include <gc.h>

int main ()
{
    void *p1 = GC_malloc (30000000 * 2);
    void *p2 = GC_malloc (6000014);
}

Running with:
GC_INITIAL_HEAP_SIZE=70000000 ./gc-hanga5
it doesn't hang. Interrupting the backtrace looks like:

#0  GC_mark_from (mark_stack_top=0x806f0e0, mark_stack=0x806f0a8, mark_stack_limit=0x80770a8) at mark.c:771
#1  0x08049cc2 in GC_mark_some (cold_gc_frame=0xbffffa74 "dã\026") at mark.c:293
#2  0x08051b75 in GC_stopped_mark (stop_func=0x80513d0 <GC_never_stop_func>) at alloc.c:520
#3  0x0805181a in GC_try_to_collect_inner (stop_func=0x80513d0 <GC_never_stop_func>) at alloc.c:367
#4  0x0805269c in GC_collect_or_expand (needed_blocks=1465, ignore_off_page=0) at alloc.c:1020
#5  0x0804928a in GC_alloc_large (lw=1500004, k=1, flags=0) at malloc.c:61
#6  0x0804959e in GC_generic_malloc (lb=6000014, k=1) at malloc.c:204
#7  0x08049744 in GC_malloc (lb=6000014) at malloc.c:311
#8  0x080491bf in main () at gc-hang.c:6

6.3 alpha4 works fine (see http://bugzilla.ximian.com/show_bug.cgi?id=59557).
I tested on debian unstable/x86 with the vanilla gc tarballs.

lupus

-- 
-----------------------------------------------------------------
lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better


More information about the Gc mailing list