[Gc] Strange issues

Boehm, Hans hans.boehm at hp.com
Wed Jan 4 15:43:22 PST 2006


If you call GC_register_displacement soon enough, that should handle the
problem.

Can you run with the GC_DUMP_REGULARLY environment variable set, and
make sure that the address of the offending static variable is included
in the root set?  

There are some instructions for debugging this sort of problem near the
end of

http://www.hpl.hp.com/personal/Hans_Boehm/gc/debugging.html

Hans

> -----Original Message-----
> From: Emmanuel Stapf [ES] [mailto:manus at eiffel.com] 
> Sent: Wednesday, January 04, 2006 2:41 PM
> To: manus at eiffel.com; Boehm, Hans; 'Ben Hutchings'; 'Shiro Kawai'
> Cc: gc at napali.hpl.hp.com
> Subject: RE: [Gc] Strange issues
> 
> 
> Looking at an old post of mine on the mailing list I realized 
> that I was compiling the GC without ALL_INTERIOR_POINTERS and 
> did not mention it in my original post.
> 
> The post from Hans is the following:
> <<
> Not entirely, unfortunately.  Without ALL_INTERIROR_POINTERS 
> (really GC_all_interior_pointers == 0 in newer collector 
> versions), interior pointers from the heap and static data 
> are not recognized; interior pointers from the stack and 
> registers still are. 
> >>
> 
> Could this be my problem? The static data I was talking about 
> contained the value p + 8 where p is the actual pointer 
> allocated via GC_malloc and I did call GC_register_displacement (8).
> 
> Hope this helps,
> Manu
> 
> > -----Original Message-----
> > From: gc-bounces at napali.hpl.hp.com
> > [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Emmanuel 
> Stapf [ES]
> > Sent: Wednesday, January 04, 2006 2:04 PM
> > To: 'Boehm, Hans'; 'Ben Hutchings'; 'Shiro Kawai'
> > Cc: gc at napali.hpl.hp.com
> > Subject: RE: [Gc] Strange issues
> > 
> > > It would be helpful if you could see if that changes
> > anything.  Search
> > > for MEM_IMAGE in dyn_load.c.  The relevant test in
> > > GC_register_dynamic_libraries() should be fairly obvious.
> > > Instead of buf.Type == MEM_IMAGE, test for (buf.type == 
> > MEM_IMAGE ||
> > > buf.type == MEM_PRIVATE).
> > 
> > I've tried this but it still does not work. I'll try to
> > investigate further to ensure this is not a bug in my code.
> > 
> > Regards,
> > Manu
> > 
> > _______________________________________________
> > 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