server: initialize first iolog header properly
authorJens Axboe <axboe@kernel.dk>
Wed, 13 Dec 2017 15:44:34 +0000 (08:44 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 13 Dec 2017 15:44:34 +0000 (08:44 -0700)
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 <axboe@kernel.dk>
server.c

index 76d662d4ce143e1745e0749bcc69732dd30cfb2a..622561411093d65da163912cdfaf29cf01333432 100644 (file)
--- 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);