Re[2]: [Gc] Segfault in GC_mark_from

Ivan Maidanski ivmai at mail.ru
Fri Oct 10 05:23:37 PDT 2008


Hi!

ktreichel at web.de wrote:
> > > 
> > > Hi,
> > > 
> > > after building libgc with assertions enabled we get the following:
> > > 
> > > Assertion failure: allchblk.c:445
> > > GC_ASSERT(!IS_MAPPED(nexthdr));
> > > 
> > > print nexthdr
> > > $2 = {hb_next = 0x477000, hb_prev = 0x85000, hb_block = 0x43c000, hb_obj_kind = 4 '\004', hb_flags = 4 '\004', hb_last_reclaimed = 6725, hb_sz = 36864, hb_descr = 190487, hb_large_block = 1 '\001', hb_map = 0x33ef8, hb_n_marks = 0, hb_marks = {0 <repeats 16 times>, 1}}
> > > 
> > > i have to mention that libgc is built with --enable-unmap
> > > 
> > > i'll try if i can find more.
> > > 
> > > Klaus
> > 
> > Hi!
> > 
> > Are You using the latest CVS snapshot?
> > Which compiler (and for which target OS) are You using?
> 
> The box where the segfault happens is a x86 GNU/Linux box.
> The gc version used is cvs until 2008-08-21 (last ChangeLog entry)
> 
> > 
> > At present I'm having SEGV in GC_is_mapped() which is called indirectly from GC_register_finalizer (thru GC_allocobj() and GC_finalize()). GC is compiled under FreeBSD with -DALL_INTERIOR_POINTERS -DNO_EXECUTE_PERMISSION -DLARGE_CONFIG -DUSE_MMAP -DUSE_MUNMAP -DGC_THREADS -DTHREAD_LOCAL_ALLOC [-DGC_ASSERTIONS].
> > I can't reproduce it with neither fewer macros defined nor with -DDBG_HDRS_ALL.
> > Other Unix OSes haven't been tried yet.
> > 
> > I'm trying to found out more...
> 
> After some more investigation we have this:
> 
> Segfault in mark.c line 795.
> 
> (gdb) p limit
> $3 = 0x39d150 <Address 0x39d150 out of bounds>
I've remembered I'd sometimes got SEGV at this place on Linux (with threads and unmapping turned on). But this was only when incremental mode set on thus all these SEGV were caught by GC_write_fault_handler() and, thus, all looked nice...
Now I think it's an error...
I can't tell you more at present.

Bye.



More information about the Gc mailing list