summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-10-21 13:26:14 -0400
committerBen Gamari <ben@smart-cactus.org>2023-04-12 07:43:40 -0400
commitc43e532d1ea9cfaeaa85303c73c4ca9d4c4e99ee (patch)
treeabf8623a856549373fab72a924b46ab8984d8abe
parentf564e14d8ef7797b1595ad41776c5384ea3bb642 (diff)
downloadhaskell-c43e532d1ea9cfaeaa85303c73c4ca9d4c4e99ee.tar.gz
nonmoving: Sanity check mutable list
Assert that entries in the nonmoving generation's generational remembered set (a.k.a. mutable list) live in nonmoving generation. (cherry picked from commit 2f08265751c13f7bd0df1c46928fc09a064a8add)
-rw-r--r--rts/sm/NonMovingSweep.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/rts/sm/NonMovingSweep.c b/rts/sm/NonMovingSweep.c
index 42344773d3..fea2d74915 100644
--- a/rts/sm/NonMovingSweep.c
+++ b/rts/sm/NonMovingSweep.c
@@ -287,6 +287,7 @@ void nonmovingSweepMutLists()
for (bdescr *bd = old_mut_list; bd; bd = bd->link) {
for (StgPtr p = bd->start; p < bd->free; p++) {
StgClosure **q = (StgClosure**)p;
+ ASSERT(Bdescr((StgPtr) *q)->gen == oldest_gen);
if (nonmovingIsAlive(*q) && !is_closure_clean(*q)) {
recordMutableCap(*q, cap, oldest_gen->no);
}