diff options
author | Ben Gamari <ben@smart-cactus.org> | 2023-03-15 16:37:27 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2023-05-16 07:56:09 -0400 |
commit | 35131c9db697de4b89670a449cd08bee473b6037 (patch) | |
tree | 73754b2b33e0852e7b077bfffb7a3a68140a7128 | |
parent | 7083db5a7ffd1fba333d3418b36f608fb239fd89 (diff) | |
download | haskell-35131c9db697de4b89670a449cd08bee473b6037.tar.gz |
rts: Initialize Array# header in listThreads#
Previously the implementation of listThreads# failed to initialize the
header of the created array, leading to various nastiness.
Fixes #23071
(cherry picked from commit 52d3e9b4189440d26bad9c5a15f9420b67b1ca5b)
-rw-r--r-- | rts/Threads.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rts/Threads.c b/rts/Threads.c index 2dce11a901..b36b4ddb81 100644 --- a/rts/Threads.c +++ b/rts/Threads.c @@ -872,6 +872,7 @@ StgMutArrPtrs *listThreads(Capability *cap) const StgWord size = n_threads + mutArrPtrsCardTableSize(n_threads); StgMutArrPtrs *arr = (StgMutArrPtrs *)allocate(cap, sizeofW(StgMutArrPtrs) + size); + SET_HDR(arr, &stg_MUT_ARR_PTRS_DIRTY_info, CCS_SYSTEM); TICK_ALLOC_PRIM(sizeofW(StgMutArrPtrs), n, 0); arr->ptrs = n_threads; arr->size = size; |