[Gc] Troubles with the mark API

Ludovic Courtès ludo at gnu.org
Fri Oct 31 12:36:35 PST 2008


Hi,

For compatibility purposes, my Guile port to libgc makes use of the
"gc_mark.h" API.  When building libgc with assertions, the program
quickly hits the following assertion:

  #4  0xb7e0442d in GC_reclaim_generic (hbp=0x81bc000, hhdr=0x8099500, sz=16, init=0, list=0x0, count=0xb7e1108c) at reclaim.c:225
  225           GC_ASSERT((hhdr)->hb_descr == 0 /* Pointer-free block */);

The backtrace goes like this:

  #3  0xb7e00f2d in GC_abort (msg=0xb7e0bfad "assertion failure") at misc.c:1076
  #4  0xb7e0442d in GC_reclaim_generic (hbp=0x81bc000, hhdr=0x8099500, sz=16, init=0, list=0x0, count=0xb7e1108c) at reclaim.c:225
  #5  0xb7e0458b in GC_reclaim_small_nonempty_block (hbp=0x81bc000, report_if_found=0, count=0xb7e1108c) at reclaim.c:252
  #6  0xb7e04d2d in GC_continue_reclaim (sz=2, kind=4) at reclaim.c:554
  #7  0xb7df420f in GC_allocobj (gran=2, kind=4) at alloc.c:1052
  #8  0xb7dfa07d in GC_generic_malloc_inner (lb=16, k=4) at malloc.c:119
  #9  0xb7dfa20a in GC_generic_malloc (lb=16, k=4) at malloc.c:159

At this point, there's been only one application-level `GC_new_kind ()'
call and several hundreds of 16-byte objects of this kind have been
allocated.  Also, the mark procedure passed to `GC_new_kind ()' simply
does "return mark_stack_ptr;".

Any idea what I should look at?

Thanks,
Ludo'.



More information about the Gc mailing list