From c20c361255683ee138f0c239e48b315e25725f7e Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 13 Dec 2017 08:44:34 -0700 Subject: [PATCH] server: initialize first iolog header properly We're sending potential stack garbage over the wire, init the whole pdu to zeroes before filling it in. This shuts up valgrind about using uninitialized memory. Signed-off-by: Jens Axboe --- server.c | 1 + 1 file changed, 1 insertion(+) diff --git a/server.c b/server.c index 76d662d4..62256141 100644 --- a/server.c +++ b/server.c @@ -1933,6 +1933,7 @@ int fio_send_iolog(struct thread_data *td, struct io_log *log, const char *name) struct flist_head *entry; int ret = 0; + memset(&pdu, 0, sizeof(pdu)); pdu.nr_samples = cpu_to_le64(iolog_nr_samples(log)); pdu.thread_number = cpu_to_le32(td->thread_number); pdu.log_type = cpu_to_le32(log->log_type); -- 2.25.1