The thread_info array is assumed to be initialized to 0s, but
that causes a segfault when MALLOC_PERTURB_ is set.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
num_threads);
}
- t = malloc(num_threads * sizeof(*t));
+ t = calloc(num_threads, sizeof(*t));
if (!t) {
- perror("malloc");
+ perror("calloc");
exit(1);
}
global_thread_info = t;