diff options
| author | Ben Gamari <ben@smart-cactus.org> | 2022-12-05 18:59:39 -0500 |
|---|---|---|
| committer | Ben Gamari <ben@smart-cactus.org> | 2023-04-12 07:43:40 -0400 |
| commit | fe94f3460e1fb542561e712871068a17ae5bb38a (patch) | |
| tree | 935548833bd68e7a40725b7924a045ac72947de2 | |
| parent | 56ca771c2f7784f4599f9b416b2afe1e934e0d30 (diff) | |
| download | haskell-fe94f3460e1fb542561e712871068a17ae5bb38a.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.
(cherry picked from commit 7dc1679b133672029dd7afae834a7fc67265035c)
| -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 26bdc76869..1b5601da2c 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); } } |
