Commit dbdac3eb authored by Simon Marlow's avatar Simon Marlow

Fix generational GC bug (#3348)

parent b41067a9
......@@ -1364,20 +1364,7 @@ scavenge_one(StgPtr p)
case IND_OLDGEN:
case IND_OLDGEN_PERM:
case IND_STATIC:
{
/* Careful here: a THUNK can be on the mutable list because
* it contains pointers to young gen objects. If such a thunk
* is updated, the IND_OLDGEN will be added to the mutable
* list again, and we'll scavenge it twice. evacuate()
* doesn't check whether the object has already been
* evacuated, so we perform that check here.
*/
StgClosure *q = ((StgInd *)p)->indirectee;
if (HEAP_ALLOCED_GC(q) && Bdescr((StgPtr)q)->flags & BF_EVACUATED) {
break;
}
evacuate(&((StgInd *)p)->indirectee);
}
#if 0 && defined(DEBUG)
if (RtsFlags.DebugFlags.gc)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment