diff options
Diffstat (limited to 'rts/sm/NonMovingMark.c')
-rw-r--r-- | rts/sm/NonMovingMark.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rts/sm/NonMovingMark.c b/rts/sm/NonMovingMark.c index bde650d0de..70e9ee34fc 100644 --- a/rts/sm/NonMovingMark.c +++ b/rts/sm/NonMovingMark.c @@ -1842,7 +1842,10 @@ bool nonmovingTidyWeaks (struct MarkQueue_ *queue) // Otherwise it's a live weak ASSERT(w->header.info == &stg_WEAK_info); - if (nonmovingIsNowAlive(w->key)) { + // See Note [Weak pointer processing and the non-moving GC] in + // MarkWeak.c + bool key_in_nonmoving = Bdescr((StgPtr) w->key)->flags & BF_NONMOVING; + if (!key_in_nonmoving || nonmovingIsNowAlive(w->key)) { nonmovingMarkLiveWeak(queue, w); did_work = true; |