From nobody Tue Feb 10 03:44:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1613144450; cv=none; d=zohomail.com; s=zohoarc; b=hpMMIpcLZwlEcUZWQTYZLRYYZmXmM38Yr/bN4eEruH9iqzjxDNF8GxFxeKIpHuGWOPc7fkb57rqb2T2cB9JCxSPcfmkSdPEfzyPvNXRz8X/9toKHFuaj1OApFZW0ZLCu1/01oo4AsEacHudnW3otX0qBNHluC33/1IOQHs8/fqc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613144450; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=iEZLTi+ry33tJpfUF6uA7SJBkEevjTid0pd1tzLvbqg=; b=LqJcb75oKRElqODdYKk933ALnqNIFk5UWsEWBhjLGfNRN4rqOn6XrFOazTHhDPkFomCGbxnnnDhjX2PSQ7ZY6v6lEZt3RwuWbYiyUEKln7301IDYRaPbfdM4MG8IUx16wVOXDQtlsCWdXnQAQiw1ngD4qlrRd3KAoEO63T0/L3A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1613144450093506.86153891726406; Fri, 12 Feb 2021 07:40:50 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.84307.158038 (Exim 4.92) (envelope-from ) id 1lAaYP-0000kD-R6; Fri, 12 Feb 2021 15:40:21 +0000 Received: by outflank-mailman (output) from mailman id 84307.158038; Fri, 12 Feb 2021 15:40:21 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lAaYP-0000k6-Ma; Fri, 12 Feb 2021 15:40:21 +0000 Received: by outflank-mailman (input) for mailman id 84307; Fri, 12 Feb 2021 15:40:20 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lAaYO-0000ix-NY for xen-devel@lists.xenproject.org; Fri, 12 Feb 2021 15:40:20 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 03ecbdec-a497-49fe-88a0-a97db26888a2; Fri, 12 Feb 2021 15:40:15 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 03ecbdec-a497-49fe-88a0-a97db26888a2 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1613144415; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8n3LNq3HpJRCzFtQilT2o7NpxGGvtcLJdJkdvWcMQnw=; b=UOgfUupnQL5p0yk51e3fisezYp6hlsMNH6UyPVrKApSDfGMmJffenVBO yLtlsPvab9cHXjk/9dayObOQudrs3DofQhA1IZYPWhHkOhsQ68k4/Ng/b L9CkvL9/mnE0xHIMfLZB265/5icY6aSu+4R1mB/SU+0a9Hb8zsNy3xpM2 E=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: Guvd7p8XjY8XoUmY5MoiKRxmWTdrFrJQvYwSBTWTuijsXIsyt20eYDpEYtfH2O5MPWoj0PTZW5 gW+twg/8I+eXOb4i9h+6tmEvxZiVKtnFr7su7KUCv3KWc2HZ9ijINDwmS7ktj4xKd+vHu5iKde 7SttGN2e6fKdhIZ4GNCVU0c2pjUepQS0r3ElBOzU6MexQBetZO8BHtO5ScZgd190YiX2gG8pAt im17uWP0xr7Pmh6vpvmx8DyPXiQ/G5vx8rrkiQvPtyYgOqwRnZ1CHMkXgr+L0m0bunnMLWCv8d qm4= X-SBRS: 5.2 X-MesageID: 38508881 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.81,174,1610427600"; d="scan'208";a="38508881" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Ian Jackson , Wei Liu , Juergen Gross Subject: [PATCH 06/10] stubdom/xenstored: Fix uninitialised variables in lu_read_state() Date: Fri, 12 Feb 2021 15:39:49 +0000 Message-ID: <20210212153953.4582-7-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20210212153953.4582-1-andrew.cooper3@citrix.com> References: <20210212153953.4582-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Various version of gcc, when compiling with -Og, complain: xenstored_control.c: In function =E2=80=98lu_read_state=E2=80=99: xenstored_control.c:540:11: error: =E2=80=98state.size=E2=80=99 is used u= ninitialized in this function [-Werror=3Duninitialized] if (state.size =3D=3D 0) ~~~~~^~~~~ xenstored_control.c:543:6: error: =E2=80=98state.buf=E2=80=99 may be used= uninitialized in this function [-Werror=3Dmaybe-uninitialized] pre =3D state.buf; ~~~~^~~~~~~~~~~ xenstored_control.c:550:23: error: =E2=80=98state.buf=E2=80=99 may be use= d uninitialized in this function [-Werror=3Dmaybe-uninitialized] (void *)head - state.buf < state.size; ~~~~~^~~~ xenstored_control.c:550:35: error: =E2=80=98state.size=E2=80=99 may be us= ed uninitialized in this function [-Werror=3Dmaybe-uninitialized] (void *)head - state.buf < state.size; ~~~~~^~~~~ Interestingly, this is only in the stubdom build. I can't identify any relevant differences vs the regular tools build. Signed-off-by: Andrew Cooper Reviewed-by: Ian Jackson Reviewed-by: Juergen Gross --- CC: Ian Jackson CC: Wei Liu CC: Juergen Gross --- tools/xenstore/xenstored_control.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/xenstore/xenstored_control.c b/tools/xenstore/xenstored_= control.c index 1f733e0a04..f10beaf85e 100644 --- a/tools/xenstore/xenstored_control.c +++ b/tools/xenstore/xenstored_control.c @@ -530,7 +530,7 @@ static const char *lu_dump_state(const void *ctx, struc= t connection *conn) =20 void lu_read_state(void) { - struct lu_dump_state state; + struct lu_dump_state state =3D {}; struct xs_state_record_header *head; void *ctx =3D talloc_new(NULL); /* Work context for subfunctions. */ struct xs_state_preamble *pre; --=20 2.11.0