Skip to content

Commit

Permalink
if rindex is null and debug is enabled this will segfault
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Mar 12, 2020
1 parent 6aa9c60 commit 92418ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/clib/pioc.c
Original file line number Diff line number Diff line change
Expand Up @@ -731,8 +731,9 @@ PIOc_InitDecomp(int iosysid, int pio_type, int ndims, const int *gdimlen, int ma
iodesc->ioid, iodesc->nrecvs, iodesc->ndof, iodesc->ndims, iodesc->num_aiotasks,
iodesc->rearranger, iodesc->maxregions, iodesc->needsfill, iodesc->llen,
iodesc->maxiobuflen));
for (int j = 0; j < iodesc->llen; j++)
PLOG((3, "rindex[%d] = %lld", j, iodesc->rindex[j]));
if (iodesc->rindex)
for (int j = 0; j < iodesc->llen; j++)
PLOG((3, "rindex[%d] = %lld", j, iodesc->rindex[j]));
#endif /* PIO_ENABLE_LOGGING */

/* This function only does something if pre-processor macro
Expand Down

0 comments on commit 92418ee

Please sign in to comment.