From b2c3b88ba95c9b8c44164064bbfe1006f93e9a11 Mon Sep 17 00:00:00 2001 From: Kyle Singer Date: Mon, 16 Dec 2024 14:37:32 -0600 Subject: [PATCH] fix segfault when CILK_ALERT=memory (and that alert is enabled in debug.h) --- runtime/internal-malloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/internal-malloc.c b/runtime/internal-malloc.c index e8ee24fb..924cb427 100644 --- a/runtime/internal-malloc.c +++ b/runtime/internal-malloc.c @@ -152,7 +152,7 @@ void dump_memory_state(FILE *out, global_state *g) { dump_buckets(out, &g->im_desc); for (unsigned int i = 0; i < g->nworkers; i++) { __cilkrts_worker *w = g->workers[i]; - if (!w) + if (!w || !w->l) continue; fprintf(out, "Worker %u:\n", i); dump_buckets(out, &w->l->im_desc);