diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-12-05 18:59:39 -0500 |
---|---|---|
committer | Zubin Duggal <zubin.duggal@gmail.com> | 2023-04-14 13:07:39 +0530 |
commit | ec8ae75ef40b74360fbb8b8363e9cb58ff717b11 (patch) | |
tree | d9d57c343764dec7cce0b1ae3cde7e3648d1416b | |
parent | a6e08eff91931443031ebc0802b7e1ee06ccc084 (diff) | |
download | haskell-ec8ae75ef40b74360fbb8b8363e9cb58ff717b11.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 81cc3d6268..d5fec0f9d4 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); } } |