diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-12-05 18:59:39 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-03-08 15:02:30 -0500 |
commit | e4c3249f00a406a406b6f1190ca8be628b643042 (patch) | |
tree | b650124ff3d07b9d608b8b022859aa5c86a02f0e | |
parent | 2db92e015655e7fc22e559020572bf23233ffaae (diff) | |
download | haskell-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.c | 2 |
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); } } |