From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 527B5C25B06 for ; Wed, 10 Aug 2022 00:32:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229830AbiHJAcu (ORCPT ); Tue, 9 Aug 2022 20:32:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229873AbiHJAct (ORCPT ); Tue, 9 Aug 2022 20:32:49 -0400 Received: from gnuweeb.org (gnuweeb.org [51.81.211.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4682C7171D for ; Tue, 9 Aug 2022 17:32:48 -0700 (PDT) Received: from integral2.. (unknown [180.246.144.41]) by gnuweeb.org (Postfix) with ESMTPSA id F2B9F807CA; Wed, 10 Aug 2022 00:32:45 +0000 (UTC) X-GW-Data: lPqxHiMPbJw1wb7CM9QUryAGzr0yq5atzVDdxTR0iA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1660091568; bh=lyFfyENiq0OH6kvBtip9CN5cUUu7Lv3+VKwr5q2xZ78=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fpRwXyryGFVTLNIgf8jaC/NdTTFGQS6mCbD32dkW+kTqfpRncbW3XOpAWWnA7rVpW /bxfoVkzm1NJjLmsr7eHld0bdEN0CktjNAkLRdOCEjSUr6DzdFVlKNRYoXTqRoM0jl 2x0a+I/ftk/3kSnr4udzOgOPLTh/kY/4wLaiCTce+1hG1XZKX5GEuAUg+4HRvil7tG vaCaRE3OL9VChpQx2fDKVT0j+hY4TCfSNW/H5IokT4TkTshK6eqT2MyloBR7fvL+fx WrkTwvmycP9xuGhEI2Y8HlzQvkuOjvjZXD24F4UGMsf0yNkkPSbNcDd6ZSUTX9vmlX m72fH9IBVXN+w== 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 08/10] test/232c93d07b74: Fix reading from uninitialized buffer Date: Wed, 10 Aug 2022 07:31:57 +0700 Message-Id: <20220810002735.2260172-9-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 Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org From: Ammar Faizi Fix this: ==2255860== Thread 2: ==2255860== Conditional jump or move depends on uninitialised value(s) ==2255860== at 0x10A073: rcv (232c93d07b74.c:150) ==2255860== by 0x490EB42: start_thread (pthread_create.c:442) ==2255860== by 0x499FBB3: clone (clone.S:100) ==2255860== ==2255860== Conditional jump or move depends on uninitialised value(s) ==2255860== at 0x10A0B6: rcv (232c93d07b74.c:150) ==2255860== by 0x490EB42: start_thread (pthread_create.c:442) ==2255860== by 0x499FBB3: clone (clone.S:100) Link: https://github.com/axboe/liburing/issues/640 Reported-by: Vitaly Chikunov Signed-off-by: Ammar Faizi --- test/232c93d07b74.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/232c93d07b74.c b/test/232c93d07b74.c index c99491f..4dc12c1 100644 --- a/test/232c93d07b74.c +++ b/test/232c93d07b74.c @@ -121,7 +121,7 @@ static void *rcv(void *arg) int done = 0; while (!done && bytes_read != 33) { - char buff[RECV_BUFF_SIZE]; + char buff[RECV_BUFF_SIZE] = { }; struct iovec iov; iov.iov_base = buff; -- Ammar Faizi