summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-12-09 23:10:22 -0500
committerBen Gamari <ben@well-typed.com>2020-12-20 21:05:13 -0500
commita2731d49d95f7397a6a267a322ed75b0c3a5c246 (patch)
treeb6317a10d31ebaa7c79ce5f7312a48314b62054e
parenta13bd3f147d63968bc50df6f43154bf2a05809df (diff)
downloadhaskell-a2731d49d95f7397a6a267a322ed75b0c3a5c246.tar.gz
nonmoving: Don't push objects during deadlock detect GC
Previously we would push large objects and compact regions to the mark queue during the deadlock detect GC, resulting in failure to detect deadlocks.
-rw-r--r--rts/sm/Evac.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/rts/sm/Evac.c b/rts/sm/Evac.c
index 4355e96399..ea40563499 100644
--- a/rts/sm/Evac.c
+++ b/rts/sm/Evac.c
@@ -441,7 +441,9 @@ evacuate_large(StgPtr p)
__atomic_fetch_or(&bd->flags, BF_NONMOVING, __ATOMIC_ACQ_REL);
// See Note [Non-moving GC: Marking evacuated objects].
- markQueuePushClosureGC(&gct->cap->upd_rem_set.queue, (StgClosure *) p);
+ if (major_gc && !deadlock_detect_gc) {
+ markQueuePushClosureGC(&gct->cap->upd_rem_set.queue, (StgClosure *) p);
+ }
}
initBdescr(bd, new_gen, new_gen->to);
@@ -598,7 +600,9 @@ evacuate_compact (StgPtr p)
__atomic_fetch_or(&bd->flags, BF_NONMOVING, __ATOMIC_RELAXED);
// See Note [Non-moving GC: Marking evacuated objects].
- markQueuePushClosureGC(&gct->cap->upd_rem_set.queue, (StgClosure *) str);
+ if (major_gc && !deadlock_detect_gc) {
+ markQueuePushClosureGC(&gct->cap->upd_rem_set.queue, (StgClosure *) str);
+ }
}
initBdescr(bd, new_gen, new_gen->to);