summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2023-01-27 12:03:49 -0500
committerZubin Duggal <zubin.duggal@gmail.com>2023-02-08 19:05:11 +0530
commit85a080e9332e27edb43eb1fcbb67eb63776d5d09 (patch)
tree081c2de8bb70d00a1b23799db4502a8d8d727151
parent71adc7881cfbf96429abaab7fc6d770a37b7bf12 (diff)
downloadhaskell-85a080e9332e27edb43eb1fcbb67eb63776d5d09.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. (cherry picked from commit 6bdce35cdd59112a8cb4a4a3b061e854ada3ff63)
-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 dd4f026977..d63ca271f9 100644
--- a/rts/sm/GC.c
+++ b/rts/sm/GC.c
@@ -375,7 +375,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;