diff options
author | GHC GitLab CI <ghc-ci@gitlab-haskell.org> | 2020-12-07 21:48:32 +0000 |
---|---|---|
committer | Ben Gamari <ben@well-typed.com> | 2020-12-20 21:05:13 -0500 |
commit | a5b2fded602ee8110dc75de2ec9910c36980ca24 (patch) | |
tree | 5197bf7034b138370fc8830b5199e3cd92fb17f0 /rts/sm | |
parent | 19823708258224266e75b0236719313b9022aba4 (diff) | |
download | haskell-a5b2fded602ee8110dc75de2ec9910c36980ca24.tar.gz |
nonmoving: Assert deadlock-gc promotion invariant
When performing a deadlock-detection GC we must ensure that all objects
end up in the non-moving generation. Assert this in scavenge.
Diffstat (limited to 'rts/sm')
-rw-r--r-- | rts/sm/Scav.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rts/sm/Scav.c b/rts/sm/Scav.c index c1f3faf998..fe6dc4be54 100644 --- a/rts/sm/Scav.c +++ b/rts/sm/Scav.c @@ -441,6 +441,14 @@ scavenge_block (bdescr *bd) p = bd->u.scan; + // Sanity check: See Note [Deadlock detection under nonmoving collector]. +#if defined(DEBUG) + if (RtsFlags.GcFlags.useNonmoving && deadlock_detect_gc) { + ASSERT(bd->gen == oldest_gen); + } +#endif + + // we might be evacuating into the very object that we're // scavenging, so we have to check the real bd->free pointer each // time around the loop. |