summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-10-21 13:26:14 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-03-08 15:02:30 -0500
commit71b038a1261754c38cf984f7c578621c3217c3bf (patch)
tree6595285931cb5731abce9255412f9169303b42bb
parentba7e7972ae14848a9ac41d5c6200d0aa5727ed72 (diff)
downloadhaskell-71b038a1261754c38cf984f7c578621c3217c3bf.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.
-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 5cd763bc92..182ff1898d 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);
}