summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-12-05 18:59:39 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-03-08 15:02:30 -0500
commite4c3249f00a406a406b6f1190ca8be628b643042 (patch)
treeb650124ff3d07b9d608b8b022859aa5c86a02f0e
parent2db92e015655e7fc22e559020572bf23233ffaae (diff)
downloadhaskell-e4c3249f00a406a406b6f1190ca8be628b643042.tar.gz
nonmoving: Don't clobber update rem sets of old capabilities
Previously `storageAddCapabilities` (called by `setNumCapabilities`) would clobber the update remembered sets of existing capabilities when increasing the capability count. Fix this by only initializing the update remembered sets of the newly-created capabilities. Fixes #22927.
-rw-r--r--rts/sm/Storage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c
index 986f6dd15a..d5b78ba12d 100644
--- a/rts/sm/Storage.c
+++ b/rts/sm/Storage.c
@@ -324,7 +324,7 @@ void storageAddCapabilities (uint32_t from, uint32_t to)
// Initialize NonmovingAllocators and UpdRemSets
if (RtsFlags.GcFlags.useNonmoving) {
nonmovingAddCapabilities(to);
- for (i = 0; i < to; ++i) {
+ for (i = from; i < to; ++i) {
nonmovingInitUpdRemSet(&getCapability(i)->upd_rem_set);
}
}