[Gc] Porting gc to Linux Cris

Boehm, Hans hans.boehm at hp.com
Wed Oct 6 10:15:15 PDT 2004


See http://www.hpl.hp.com/personal/Hans_Boehm/gc/debugging.html under "Prematurely Reclaimed Objects".

Since you are clearly dealing with a collector problem, you should particularly look at the "If all else fails ..." section, which actually describes how to attack this with gdb.

I would first check where in test.c it fails.  Since you are dealing with port of a working collector, odds are that the collector's idea of where the roots (possible pointer variable locations) are is incorrect.  The collector test manipulates lists that are pointed to by both statically allocated and stack variables.  If it fails trying to access a list that was referenced by a stack variable, check that GC_stackbottom points to the base of the stack.  If the list is referenced by a statically allocated variable, call GC_dump() from the debugger, and check that the variable is in one of the root ranges.

If the collector test works substantially better without compiler optimization, suspect the code that pushes register contents onto the mark stack.

Hans



> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com
> [mailto:gc-bounces at napali.hpl.hp.com]On Behalf Of Simon Posnjak
> Sent: Wednesday, October 06, 2004 7:19 AM
> To: gc at napali.hpl.hp.com
> Subject: [Gc] Porting gc to Linux Cris
> 
> 
> Hi all,
> 
> I am trying to port gc to Linux running on Axis Cris
> (http://developer.axis.com). The simple example program runs 
> perfectly,
> but when I run the test program i get segmentation fault or the
> following message:
> 
> /var # ./test
> List reversal produced incorrect list - collector is broken
> Test failed
> 
> The memory consuption at this point is abut 3.5MB.
> 
> Any ideas how to fix this?
> 
> The test platform has 16 MB of RAM (about 10 of it is free for the
> test). I am running the Linux kernel 2.4.26. The C lib is uClibc
> (http://www.uclibc.org) - I also tried with glibc but the 
> result is the
> same.
> 
> I attached my patch - could somebody please look over it and tell if I
> did something wrong. Thank you.
> 
> 		Regards Simon
> 
> 


More information about the Gc mailing list