summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2023-01-27 12:03:49 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-03-08 15:02:31 -0500
commit96a5aaede899f95fb06dcdb9d0439bbea0f93e14 (patch)
tree6ef583ffff7b443b5ede5007c5123c8260977cce
parent4a7650d75752fcde2fc5bc23913e4116ae2ec582 (diff)
downloadhaskell-96a5aaede899f95fb06dcdb9d0439bbea0f93e14.tar.gz
nonmoving: Don't call prepareUnloadCheck
When the nonmoving GC is in use we do not call `checkUnload` (since we don't unload code) and therefore should not call `prepareUnloadCheck`, lest we run into assertions.
-rw-r--r--rts/sm/GC.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/rts/sm/GC.c b/rts/sm/GC.c
index 43564808c9..0817b80758 100644
--- a/rts/sm/GC.c
+++ b/rts/sm/GC.c
@@ -376,7 +376,8 @@ GarbageCollect (uint32_t collect_gen,
static_flag == STATIC_FLAG_A ? STATIC_FLAG_B : STATIC_FLAG_A;
}
- if (major_gc) {
+ /* N.B. We currently don't unload code with the non-moving collector. */
+ if (major_gc && !RtsFlags.GcFlags.useNonmoving) {
unload_mark_needed = prepareUnloadCheck();
} else {
unload_mark_needed = false;