Skip to content

Commit 88d307e

Browse files
Kyle Singerkyle-singer
authored andcommitted
fix segfault when CILK_ALERT=memory (and that alert is enabled in debug.h)
1 parent b71934c commit 88d307e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runtime/internal-malloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ void dump_memory_state(FILE *out, global_state *g) {
152152
dump_buckets(out, &g->im_desc);
153153
for (unsigned int i = 0; i < g->nworkers; i++) {
154154
__cilkrts_worker *w = g->workers[i];
155-
if (!w)
155+
if (!w || !w->l)
156156
continue;
157157
fprintf(out, "Worker %u:\n", i);
158158
dump_buckets(out, &w->l->im_desc);

0 commit comments

Comments
 (0)