From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from integral2.. (unknown [180.246.144.41]) by gnuweeb.org (Postfix) with ESMTPSA id 16F2E807CA; Wed, 10 Aug 2022 00:32:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1660091573; bh=6G26TH3u8k3JCLyT8Jc7GHih4BvnsCUEfWTRbUwRZ+U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AosnPtO6hlMFRmapzSsNK1ZnTodMdNq8zZpfJIJ7ZWfG18PrXNg1D4gWXuI5N7ua1 teSXnRY5X4aIXFFbgnpj+SzETi7YY6rtDgpr4DE8MAkUbKV3qI9C12ZnKETIcDMOtv HcWiOBYZoi9THiqa8nzOv+6/RFv0L4dhmmPZ4Xi9Tgb/ZNNcyumaVLVCwi8HlhAnhN fya/SfAJM8Jufd48xzbInE5uteCwv2rdvV8Q1z30syrUIaI8Mv0dQvO6rL3CuStttA eDhQIl9xambDZXPecEyWIA8SngXoihRZCk1xfLngh6T5tjJnwgbjbD1x1zYIdnrFzC /iorHjPaCx1QQ== From: Ammar Faizi To: Jens Axboe Cc: Ammar Faizi , Vitaly Chikunov , Fernanda Ma'rouf , Kanna Scarlet , io-uring Mailing List , GNU/Weeb Mailing List Subject: [PATCH liburing v1 10/10] test/file-register: Fix reading from uninitialized buffer Date: Wed, 10 Aug 2022 07:31:59 +0700 Message-Id: <20220810002735.2260172-11-ammar.faizi@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220810002735.2260172-1-ammar.faizi@intel.com> References: <20220810002735.2260172-1-ammar.faizi@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: From: Ammar Faizi Fix this: ==2256677== Conditional jump or move depends on uninitialised value(s) ==2256677== at 0x485207E: bcmp (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==2256677== by 0x10BEAE: test_fixed_read_write (file-register.c:489) ==2256677== by 0x10AED2: test_skip (file-register.c:595) ==2256677== by 0x10AED2: main (file-register.c:1087) Link: https://github.com/axboe/liburing/issues/640 Reported-by: Vitaly Chikunov Signed-off-by: Ammar Faizi --- test/file-register.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/file-register.c b/test/file-register.c index 634ef81..0a8aa57 100644 --- a/test/file-register.c +++ b/test/file-register.c @@ -431,7 +431,7 @@ static int test_fixed_read_write(struct io_uring *ring, int index) iov[0].iov_len = 4096; memset(iov[0].iov_base, 0x5a, 4096); - iov[1].iov_base = t_malloc(4096); + iov[1].iov_base = t_calloc(1, 4096); iov[1].iov_len = 4096; sqe = io_uring_get_sqe(ring); -- Ammar Faizi