From 52d3e9b4189440d26bad9c5a15f9420b67b1ca5b Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Wed, 15 Mar 2023 16:37:27 -0400 Subject: 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 --- rts/Threads.c | 1 + 1 file changed, 1 insertion(+) (limited to 'rts') 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; -- cgit v1.2.1