diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-10-12 22:30:52 +0000 |
---|---|---|
committer | Zubin Duggal <zubin.duggal@gmail.com> | 2023-02-08 14:54:52 +0530 |
commit | 1c4ce072564d07350b40f44cf7a1b99d36fa6af7 (patch) | |
tree | 036b8a11211497e9f2a239bd7a9d6781dc0660d8 | |
parent | 3d26addfb18c8d03de6fe273bdac361bd82c6b4c (diff) | |
download | haskell-1c4ce072564d07350b40f44cf7a1b99d36fa6af7.tar.gz |
nonmoving: Don't push empty arrays to update remembered set
Previously the write barrier of resizeSmallArray# incorrectly handled
resizing of zero-sized arrays, pushing an invalid pointer to the update
remembered set.
Likely fixes the cause of #22264.
(cherry picked from commit f8988a9c53ae73ff5b9c6008f467a7171e99c61f)
-rw-r--r-- | rts/PrimOps.cmm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm index 988a44ec9b..96d94893a3 100644 --- a/rts/PrimOps.cmm +++ b/rts/PrimOps.cmm @@ -234,9 +234,9 @@ stg_shrinkSmallMutableArrayzh ( gcptr mba, W_ new_size ) p = mba + SIZEOF_StgSmallMutArrPtrs + WDS(new_size); end = mba + SIZEOF_StgSmallMutArrPtrs + WDS(StgSmallMutArrPtrs_ptrs(mba)); again: - ccall updateRemembSetPushClosure_(BaseReg "ptr", - W_[p] "ptr"); if (p < end) { + ccall updateRemembSetPushClosure_(BaseReg "ptr", + W_[p] "ptr"); p = p + SIZEOF_W; goto again; } |