From nobody Tue Feb 10 06:26:04 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+46277+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1566557908790733.341966722022; Fri, 23 Aug 2019 03:58:28 -0700 (PDT) Return-Path: X-Received: from EUR02-HE1-obe.outbound.protection.outlook.com (EUR02-HE1-obe.outbound.protection.outlook.com [40.107.1.43]) by groups.io with SMTP; Fri, 23 Aug 2019 03:58:27 -0700 X-Received: from AM6PR08CA0044.eurprd08.prod.outlook.com (2603:10a6:20b:c0::32) by AM5PR0801MB1841.eurprd08.prod.outlook.com (2603:10a6:203:2e::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.16; Fri, 23 Aug 2019 10:58:23 +0000 X-Received: from VE1EUR03FT064.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::203) by AM6PR08CA0044.outlook.office365.com (2603:10a6:20b:c0::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.15 via Frontend Transport; Fri, 23 Aug 2019 10:58:22 +0000 Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+46277+1787277+3901457@groups.io; helo=web01.groups.io; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT064.mail.protection.outlook.com (10.152.19.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:58:21 +0000 X-Received: ("Tessian outbound 4f2e8f9f1994:v27"); Fri, 23 Aug 2019 10:58:20 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4721cc0a0d9ac3d6 X-CR-MTA-TID: 64aa7808 X-Received: from ad9096f4aa2a.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.12.58]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id DE912E6E-A1AA-4AB7-B27E-FB1B8E9C9801.1; Fri, 23 Aug 2019 10:58:20 +0000 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04lp2058.outbound.protection.outlook.com [104.47.12.58]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ad9096f4aa2a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 23 Aug 2019 10:58:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=haD5bXipXoX65r83Pq19E7oG+DzT9scnr5kJL5YZOawx4q9TD4CTPgYyNpTM/6vGl/GjxwcLxKF+uf/pZKnYPKMZqJ+1n4Yn0+2BQXKdXf9kfUUhVnNE0FYjazuL8o9qIsBHwXUMlRGcFj8Uu71+LsQApgcY2+VCv8AeIftZpnIZ/XhN2c339ynm5YdeuH4emt5/O5UIWSjh80ndEp5YZZgrX7sQNvihyUm9VqP/1b6jwzdO0qxghTI6kKjNyg+k8FQmn1r2H4TBH6x7RAznLOH0R0o+/QkeRcNfCm6ok/Q7sQ2k3+wLZNxKOlImCzClc1a8BgLiVJWSnrtSJj6jAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Sbyp5hrEj5iFZxbhb5y/xWVPJW+UmDyuWgEPR24Urtg=; b=e7YMqDHMyeKuo2Sw4nLZyxKtnJmMME529Yk5K/op0oApBi0jSHLHa3b7gJRvuCDLvJVjNWysYN93Cj6laWFCDAEyM795NaySd5CsXjDD1cNaOS/zfHN+cqVdaeQ7IglPnLpU5r6uLX/WqgyzGL8aux4SNCDjvVP15zYwEs+rBE+phSGBK98NfqzwdrFsRnjQSnJk4UwYBgSd1XzpaCiYg0PQe5m+edVoB2LzxHRMADSSNv5KLxP7ud32/6Br5inBOXVmzUuSP2u8imypxFVILo0Cj+yt4toGsp8gtV6vbINcrZK+kCeULE1HNLO0UM9ZpqgdtaZhnpSqJSRgfDYLfg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=temperror (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=temperror action=none header.from=arm.com; dkim=none (message not signed); arc=none X-Received: from AM4PR08CA0077.eurprd08.prod.outlook.com (2603:10a6:205:2::48) by HE1PR0801MB1851.eurprd08.prod.outlook.com (2603:10a6:3:7b::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.16; Fri, 23 Aug 2019 10:58:18 +0000 X-Received: from AM5EUR03FT045.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::208) by AM4PR08CA0077.outlook.office365.com (2603:10a6:205:2::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.15 via Frontend Transport; Fri, 23 Aug 2019 10:58:18 +0000 Authentication-Results-Original: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) X-Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT045.mail.protection.outlook.com (10.152.17.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:58:16 +0000 X-Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1415.2; Fri, 23 Aug 2019 10:56:27 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1415.2; Fri, 23 Aug 2019 10:56:25 +0000 X-Received: from E107187.Arm.com (10.1.195.55) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Fri, 23 Aug 2019 10:56:25 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , Subject: [edk2-devel] [PATCH v1 14/19] DynamicTablesPkg: PPTT: Fix uninitialized memory usage Date: Fri, 23 Aug 2019 11:55:34 +0100 Message-ID: <20190823105539.13260-15-sami.mujawar@arm.com> In-Reply-To: <20190823105539.13260-1-sami.mujawar@arm.com> References: <20190823105539.13260-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;IPV:NLI;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(396003)(39860400002)(136003)(346002)(376002)(2980300002)(189003)(199004)(70206006)(50466002)(48376002)(53416004)(2351001)(86362001)(47776003)(36756003)(356004)(6666004)(2906002)(4326008)(14444005)(53936002)(26005)(305945005)(6916009)(186003)(1076003)(44832011)(51416003)(63350400001)(76176011)(8936002)(11346002)(446003)(63370400001)(126002)(476003)(2616005)(50226002)(426003)(486006)(7696005)(478600001)(81156014)(81166006)(5660300002)(336012)(8676002)(54906003)(70586007)(316002)(16586007);DIR:OUT;SFP:1101;SCL:1;SRVR:HE1PR0801MB1851;H:nebula.arm.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: db122733-cc7e-4a50-235b-08d727b8cfef X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328);SRVR:HE1PR0801MB1851; X-MS-TrafficTypeDiagnostic: HE1PR0801MB1851:|AM5PR0801MB1841: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true X-MS-Oob-TLC-OOBClassifiers: OLM:8882;OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: fTPcl1/1vx7DN6LZEMVYAGrP8zga/+xQPOJxF1phQG7XrnQ6LqwY+JIlimzzWQMyjEW8iuqohu/es/q1ZR5Lxe0+s9pJi/tbx1eLxXQ38iw0jfal35BI3r1b4ypRFjXyzYJeWOb/UbNzmzqmyf88yu+XtZAIpigdSMvgNwlYLJgiqNm/dRbHADHrpiLPMI7z3DLwv3Eg+ZUefjDLZz2hEG8uFEjlhmwmvMcB+P0o2IIvncpM2TMPBnnIV63dRX/JlBTcQk7EF6legWY2CMng8KGE6EjsM872crj2Yw1M8Txd2IBjDcbZpaszwQFKAmE45CvbjTJboOeoSLInWPBPuJpHug/NlEUJQkxoiUnFgLoo7fm4Bj0Q5d7Sz/dABJxjCYcuEFA/xw4w4K/RD8GZxgZRH2VA6OtwFvlvfjUOfM8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1851 Original-Authentication-Results: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 471806c3-c6c2-47e3-a731-08d727b8cd35 NoDisclaimer: True X-Microsoft-Antispam-Message-Info: r7BNkIE8aIxlUlbWgQmJbEn7vEugQZGk7CwLt97gEWvi2u/434ntjJDB1u2eZ0mGl1XVAKp1lfc+cOilwzM1O9Y3nKEJTfUvdJ9hUWbbtLCNStVWX6HHTqk28CLVYXKHKM/CzMEpvU9Inki4HNnjobehfQIjnJDiME8ssN3ZLTTEc9m9BlR5F5K4H++x9s+yZwmTgDjJEUyFA9IhwBGUct47d0AXqbGwDBhO9sAfZE6MpiGp/w3jrKmiI9DdLMR41wny9CgjAZ626ZJxOrXsi/RmtqvVwOgiT5Ycp6aYgLCkhq3Lf0QdoAx8HFTgh4HSkXjZNilbcAnDH3FHylNL71E9GvjBqOnQY3FTXO0OcJtbrIL/LzxgVGo7rRx9iwEXDeK7b6H/XQH/qHSmYJnkmwFRmBJ43aBukkiqPGBEBlg= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2019 10:58:21.0394 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: db122733-cc7e-4a50-235b-08d727b8cfef X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1841 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1566557908; bh=Czu/kUG2GQZjScPM/wwTfnbgIOfXJbN8NdRBc0VVYeA=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=gOE+Ex+ytrVgIMPz0cS51MFxDe1roIcSjRrkOoBYPhOQQDkAlpV2BOEnnWuSZAw/Li4 HZ51quTabv9OzjKIT7bXfiC7PNF3dPutdAGfhIk2iGeFaw+kOk3+SjfAt1ircY9/aPJ8p NafPh7BqIqat7uAkZfZXwaEpIwZ6EzNZbnc= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" On enabling the /analyse option the VS2017 compiler reports: warning C6001: Using uninitialized memory. This warning is reported as some variables that were being logged were uninitialised. To fix this, moved the logging code after the variables being logged are initialised. Signed-off-by: Sami Mujawar Reviewed-by: Alexei Fedorov --- DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c | 59 ++++= ++++++---------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c index 82070403ac8757f54e839fd00eb4acb3292fc60c..d70fc59e754e7d348965b8c3739= 822a9f1c4b7e6 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c @@ -1203,6 +1203,17 @@ BuildPpttTable ( Generator->ProcHierarchyNodeCount, &NodeIndexer ); + + DEBUG (( + DEBUG_INFO, + " ProcHierarchyNodeCount =3D %d\n" \ + " ProcHierarchyNodeOffset =3D 0x%x\n" \ + " ProcHierarchyNodeIndexedList =3D 0x%p\n", + Generator->ProcHierarchyNodeCount, + ProcHierarchyNodeOffset, + Generator->ProcHierarchyNodeIndexedList + )); + } =20 // Include the size of Cache Type Structures and index them @@ -1215,6 +1226,15 @@ BuildPpttTable ( Generator->CacheStructCount, &NodeIndexer ); + DEBUG (( + DEBUG_INFO, + " CacheStructCount =3D %d\n" \ + " CacheStructOffset =3D 0x%x\n" \ + " CacheStructIndexedList =3D 0x%p\n", + Generator->CacheStructCount, + CacheStructOffset, + Generator->CacheStructIndexedList + )); } =20 // Include the size of ID Type Structures and index them @@ -1227,6 +1247,15 @@ BuildPpttTable ( Generator->IdStructCount, &NodeIndexer ); + DEBUG (( + DEBUG_INFO, + " IdStructCount =3D %d\n" \ + " IdStructOffset =3D 0x%x\n" \ + " IdStructIndexedList =3D 0x%p\n", + Generator->IdStructCount, + IdStructOffset, + Generator->IdStructIndexedList + )); } =20 DEBUG (( @@ -1238,36 +1267,6 @@ BuildPpttTable ( TableSize )); =20 - DEBUG (( - DEBUG_INFO, - " ProcHierarchyNodeCount =3D %d\n" \ - " ProcHierarchyNodeOffset =3D 0x%x\n" \ - " ProcHierarchyNodeIndexedList =3D 0x%p\n", - Generator->ProcHierarchyNodeCount, - ProcHierarchyNodeOffset, - Generator->ProcHierarchyNodeIndexedList - )); - - DEBUG (( - DEBUG_INFO, - " CacheStructCount =3D %d\n" \ - " CacheStructOffset =3D 0x%x\n" \ - " CacheStructIndexedList =3D 0x%p\n", - Generator->CacheStructCount, - CacheStructOffset, - Generator->CacheStructIndexedList - )); - - DEBUG (( - DEBUG_INFO, - " IdStructCount =3D %d\n" \ - " IdStructOffset =3D 0x%x\n" \ - " IdStructIndexedList =3D 0x%p\n", - Generator->IdStructCount, - IdStructOffset, - Generator->IdStructIndexedList - )); - // Allocate the Buffer for the PPTT table *Table =3D (EFI_ACPI_DESCRIPTION_HEADER*)AllocateZeroPool (TableSize); if (*Table =3D=3D NULL) { --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#46277): https://edk2.groups.io/g/devel/message/46277 Mute This Topic: https://groups.io/mt/32999800/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-