summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-12-09 23:10:22 -0500
committerGHC GitLab CI <ghc-ci@gitlab-haskell.org>2020-12-10 04:30:34 +0000
commitb1b55be16f901f1eb67937560379fa9a75c88581 (patch)
tree150c3a8e4175c6a0eebfe70d3b511f4228389ae9
parent0c7f20e213f1bc37300224c933bb923892654aed (diff)
downloadhaskell-b1b55be16f901f1eb67937560379fa9a75c88581.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 31965b7bde..bee6e583dc 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);