[Gc] 6.3alpha6 hangs when allocating large objects

Varga Zoltan vargaz at freemail.hu
Sat Jun 5 09:11:05 PDT 2004


                                       Hi,

  The following test case seems to make 6.3apha6 hang:

#include <gc.h>

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

I'm using debian unstable, kernel 2.6.6, gcc 3.3.3 and a
statically linked
libgc.a. alpha5 also hangs, while alpha4 seems to work.

gdb prints the following stack trace:

#0  GC_mark_from (mark_stack_top=0x806f0e0,
mark_stack=0x806f0a8,
    mark_stack_limit=0x80770a8) at mark.c:772
#1  0x08049cc2 in GC_mark_some (cold_gc_frame=0xbffff394
"da\026")
        at mark.c:293
#2  0x08051b35 in GC_stopped_mark (stop_func=0x8051390
<GC_never_stop_func>)
            at alloc.c:520
#3  0x080517da in GC_try_to_collect_inner (
                stop_func=0x8051390 <GC_never_stop_func>) at
alloc.c:367
#4  0x0805265c in GC_collect_or_expand (needed_blocks=1465, igno
re_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 ()


                                                           
              Zoltan





More information about the Gc mailing list