GC Bug

Richard Earnshaw rearnsha@arm.com
Thu Sep 9 06:34:00 GMT 1999


I'm trying to track down a GC problem on the ARM, which causes a crash.  
I've found the following fragment in except.c:



static rtx
call_get_eh_context ()
{
  static tree fn;
  tree expr;

  if (fn == NULL_TREE)
    {


Note that fn is persistent, but there seems to be no gc root registered 
for this when it is first allocated.  Hence, the tree can get GCed later 
and if subsequently recalled can contain garbage.

I guess fn either needs to be made global (or at least file-static) and a 
gc root added, or call_get_eh_context needs to add a root for fn when it 
is first initialized.

What about marking issues?

R. 



More information about the Gcc-bugs mailing list