xfstests: aio-stress, use calloc for thread_info array
PATCH 1/1 xfstests: aio-stress, use calloc for thread_info array
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 <[email protected]>
---
ltp/aio-stress.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
ltp/aio-stress.c +2 -2
@@ -1413,9 +1413,9 @@ int main(int ac, char **av) 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;
Signature · 7 lines
Jeff Mahoney SUSE Labs _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs