summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2023-03-15 16:37:27 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-04-20 18:34:11 -0400
commit52d3e9b4189440d26bad9c5a15f9420b67b1ca5b (patch)
tree01e84a982eddc1bd6a73894aa9e0fd2b3b82c790 /rts
parent5c8731244bc13a3d813d2a4d53b3188b28dc8355 (diff)
downloadhaskell-52d3e9b4189440d26bad9c5a15f9420b67b1ca5b.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
Diffstat (limited to 'rts')
-rw-r--r--rts/Threads.c1
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;