[Gc] Issues with GC custom marking routines

Hans Boehm Hans.Boehm at hp.com
Tue Oct 10 21:43:34 PDT 2006


The reclaim.c assertion failure suggests you set up an object "kind"
which is uninitialized but pointer-free.  This is currently not
supported.  It causes problems because free lists may end up
containing garbage fields that will end up getting traced.

The mark.c assertion suggests that you have an absurdly large
legnth as a descriptor associated with the kind.

In both cases, the issue seems likely to be related to how the
"kind"s are set up, and not the details of the custom marking.

Hans

On Sun, 8 Oct 2006, Laurynas Biveinis wrote:

> Hi,
>
> I'm trying to make use of custom marking routines for GCC internal GC.
> After several collections a heap corruption becomes apparent. I've
> rebuilt collector with -DGC_ASSERTIONS -DKEEP_BACK_PTRS -DDBG_HDRS_ALL
> -DCHECKSUMS and when I'm trying to run GCC, I get this:
>
> Without debugger:
> Assertion failure: ../../gcc-boehm-custom-marking/boehm-gc/mark.c:654
>
> Under debugger:
> Assertion failure: ../../gcc-boehm-custom-marking/boehm-gc/reclaim.c:693
>
> #3  0x00000000013cb01e in GC_reclaim_generic (hbp=0x2aaaab26b000,
> hhdr=0x2aaaab15d810, sz=12, init=0, list=0x0)
>     at ../../gcc-boehm-custom-marking/boehm-gc/reclaim.c:693
> 693	      GC_ASSERT((hhdr)->hb_descr == 0 /* Pointer-free block */);
> (gdb) print *hhdr
> $5 = {hb_sz = 12, hb_next = 0x2aaaab292000, hb_prev = 0x0, hb_descr =
> 34, hb_map = 0x2aaaaaad0d88 "", hb_obj_kind = 4 '\004',
>   hb_flags = 0 '\0', hb_last_reclaimed = 2, hb_marks =
> {1153203048319811584, 72075190519988480, 4504699407499280,
> 1153203048319815681,
>     72075190519988480, 4504699407499280, 1153203048319815681, 17596482060544}}
>
> I realize that I'm providing too little information (for instance,
> none of my client side code, as autogenerated marker routines are
> numerous), but I'm lost how to continue debugging from here. I'm using
> version 6.8 on x86_64-unknown-linux-gnu. Any hint on what when wrong
> here and how to get on track with debugging it would be appreciated.
>
> --
> TIA,
> Laurynas
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com
> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
>


More information about the Gc mailing list