From nobody Thu Dec 18 17:51:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559072990; cv=none; d=zoho.com; s=zohoarc; b=mBIX1RUr/8mOtjlOfyt5hb1cNyROu7QRj5GNka1vVF0xx/Wi7x99kzPxZ9ogaRNdsji+G6B704GQFFgsknzscrp4N/PZC1OmPyPkPXiigUGrZisgIoJuW7TeSBiOMs9p46nPy0Z5g8El9whFxc3eyZTjgQqAJcT4r9WcTuUlJk8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559072990; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=3VbzSwN2tBd1cuHuygf/n9QeWUpdQSR8LXHhmkcIsRE=; b=kzVTf20pa+NLctaL6iCRssoZPftI5dT9jKfKYQJIrO1KroNxYHhL0nKy7tKh2oMb2GVC+Lz0Fv61d7pnOTxvRBosXSQknqqGCsLwmhGrDQCIkomyt/j8wQQWUYI9GjQ0UTpsEPOySKyFQbnh8FlVzSoiabHNtQLy7P9AakXSvwM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 155907299075847.84086371724095; Tue, 28 May 2019 12:49:50 -0700 (PDT) Received: from localhost ([127.0.0.1]:41791 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVi6O-00082B-PL for importer@patchew.org; Tue, 28 May 2019 15:49:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVhpN-0002bR-A1 for qemu-devel@nongnu.org; Tue, 28 May 2019 15:32:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVhpM-0002sv-3b for qemu-devel@nongnu.org; Tue, 28 May 2019 15:32:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23536) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hVhpH-00018f-5d; Tue, 28 May 2019 15:31:59 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A4ECB81E05; Tue, 28 May 2019 19:29:48 +0000 (UTC) Received: from localhost (unknown [10.40.205.223]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3BE9F5D71A; Tue, 28 May 2019 19:29:48 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Tue, 28 May 2019 21:28:46 +0200 Message-Id: <20190528192847.2730-21-mreitz@redhat.com> In-Reply-To: <20190528192847.2730-1-mreitz@redhat.com> References: <20190528192847.2730-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 28 May 2019 19:29:48 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 20/21] qcow2-bitmap: initialize bitmap directory alignment X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Andrey Shinkevich Valgrind detects multiple issues in QEMU iotests when the memory is used without being initialized. Valgrind may dump lots of unnecessary reports what makes the memory issue analysis harder. Particularly, that is true for the aligned bitmap directory and can be seen while running the iotest #169. Padding the aligned space with zeros eases the pain. Signed-off-by: Andrey Shinkevich Message-id: 1558961521-131620-1-git-send-email-andrey.shinkevich@virtuozzo.= com Signed-off-by: Max Reitz --- block/qcow2-bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c index 640da68ce1..b2487101ed 100644 --- a/block/qcow2-bitmap.c +++ b/block/qcow2-bitmap.c @@ -753,7 +753,7 @@ static int bitmap_list_store(BlockDriverState *bs, Qcow= 2BitmapList *bm_list, dir_offset =3D *offset; } =20 - dir =3D g_try_malloc(dir_size); + dir =3D g_try_malloc0(dir_size); if (dir =3D=3D NULL) { return -ENOMEM; } --=20 2.21.0