Using verbose with affinity and no affinity mask causes a segmentation mask. Fix this by checking if the affinity mask is NULL before printing the verbose message. Reported-by: Pierre Gondois <pierre.gondois@xxxxxxx> Signed-off-by: John Kacur <jkacur@xxxxxxxxxx> --- src/cyclictest/cyclictest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c index d90228a7ebec..decea786268a 100644 --- a/src/cyclictest/cyclictest.c +++ b/src/cyclictest/cyclictest.c @@ -1088,7 +1088,7 @@ static void process_options(int argc, char *argv[], int max_cpus) if (setaffinity == AFFINITY_SPECIFIED && !affinity_mask) display_help(1); - if (verbose) + if (verbose && affinity_mask) printf("Using %u cpus.\n", numa_bitmask_weight(affinity_mask)); break; -- 2.36.1