From nobody Mon Feb 9 16:19:12 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+56575+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 1585494864013873.1890967871573; Sun, 29 Mar 2020 08:14:24 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id t3WhYY1788612xKEklckRIyo; Sun, 29 Mar 2020 08:14:23 -0700 X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com (EUR04-HE1-obe.outbound.protection.outlook.com [40.107.7.55]) by mx.groups.io with SMTP id smtpd.web10.29270.1585494862735236514 for ; Sun, 29 Mar 2020 08:14:23 -0700 X-Received: from AM6PR04CA0069.eurprd04.prod.outlook.com (2603:10a6:20b:f0::46) by VE1PR08MB4863.eurprd08.prod.outlook.com (2603:10a6:802:ac::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.18; Sun, 29 Mar 2020 15:14:19 +0000 X-Received: from AM5EUR03FT030.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:f0:cafe::65) by AM6PR04CA0069.outlook.office365.com (2603:10a6:20b:f0::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.20 via Frontend Transport; Sun, 29 Mar 2020 15:14:19 +0000 Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+56575+1787277+3901457@groups.io; helo=web01.groups.io; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT030.mail.protection.outlook.com (10.152.16.117) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.17 via Frontend Transport; Sun, 29 Mar 2020 15:14:19 +0000 X-Received: ("Tessian outbound 60d769d68364:v48"); Sun, 29 Mar 2020 15:14:19 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: cd96ed54a72baafc X-CR-MTA-TID: 64aa7808 X-Received: from bac14d3f59a9.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id A9A6C375-1C54-460B-A54F-BBC115D59CBE.1; Sun, 29 Mar 2020 15:14:13 +0000 X-Received: from EUR01-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id bac14d3f59a9.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sun, 29 Mar 2020 15:14:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bjTXqT1i7YQDjLgdAWxMG4uORBb846s6vmhJsaLv2GNhn+32tTKXJ20QnnOepCMQBoIU1u7C9hqdh5bYVX7bpKZm1WOTWckglH0AQA2F8Fcu9QVjdLXPKos7PxXo3FRmsiy7iFK2hDYpI0RSD2kw6BY6a8LIermNdX5wdWmLsYb94ycuGCyIh51hInxaIeM3mwR+YuiDiYeH3WwO/Vf+Wbplz7gUSBk4Mb4+sT7f4cYSHppp/KcPfW6DtydPOYxp5DLnSL8SSMSe5h02gxNpS4+6Vlng48w03ezlXbXlYq+TZQcnadujqVDaoL2a/5bXcD65C60hBMLTqgE+SCrPxw== 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=F3Su/tqf9kOTHUzzA1yKLSETpHU0wfnOEIsjmbAhOUw=; b=it4gdQRSltHqQp1ihM4h0L5JOHFTashXkRTSHtBvvVWFUtQ5V0e65/rx+DxeIb1d8TbdmIh1sLaMXQOZJkTWFEEvQDVXDdQJRPqgwOt+rimf3z+LK6DadpUs7GVlp72dh/RUSIuPCp3LkQQ3bj7Y+31+V+K1rAyt+WbmNr4cXdadn6+GwonjqgomXBYLTF7+OrUPDqZ7/iLIZ0xaSqByFPIj/837hymyumSLMNwdte3rQgTwT6oxrSdyZ6jFBzjDSrs4Y5OTtXFwhTRgDJLG2ghpmtCufM6H8pbxvK7Qd9wBnfKi4QbbzHwIOpILV5vTeNkcJO9ci4Rwcj1bIRUWgA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=bestguesspass action=none header.from=arm.com; dkim=none (message not signed); arc=none X-Received: from VE1PR03CA0012.eurprd03.prod.outlook.com (2603:10a6:802:a0::24) by VI1PR08MB2992.eurprd08.prod.outlook.com (2603:10a6:803:44::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.18; Sun, 29 Mar 2020 15:14:12 +0000 X-Received: from VE1EUR03FT062.eop-EUR03.prod.protection.outlook.com (2603:10a6:802:a0:cafe::49) by VE1PR03CA0012.outlook.office365.com (2603:10a6:802:a0::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.20 via Frontend Transport; Sun, 29 Mar 2020 15:14:12 +0000 Authentication-Results-Original: spf=pass (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=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; X-Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT062.mail.protection.outlook.com (10.152.18.252) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.2856.17 via Frontend Transport; Sun, 29 Mar 2020 15:14:11 +0000 X-Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1415.2; Sun, 29 Mar 2020 15:14:08 +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.1779.2; Sun, 29 Mar 2020 15:14:08 +0000 X-Received: from E107187.Arm.com (10.57.20.21) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Sun, 29 Mar 2020 15:14:07 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , Subject: [edk2-devel] [PATCH v2 14/16] DynamicTablesPkg: PPTT: Fix uninitialized memory usage Date: Sun, 29 Mar 2020 16:13:51 +0100 Message-ID: <20200329151353.14096-15-sami.mujawar@arm.com> In-Reply-To: <20200329151353.14096-1-sami.mujawar@arm.com> References: <20200329151353.14096-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;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFTY:;SFS:(10009020)(4636009)(346002)(376002)(136003)(396003)(39850400004)(46966005)(82740400003)(54906003)(4326008)(36756003)(26005)(316002)(6916009)(186003)(86362001)(47076004)(6666004)(356004)(1076003)(966005)(44832011)(2906002)(7696005)(336012)(5660300002)(70586007)(70206006)(8676002)(8936002)(478600001)(426003)(2616005)(81166006)(81156014);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e42a8d82-8d31-4990-a574-08d7d3f3da82 X-MS-TrafficTypeDiagnostic: VI1PR08MB2992:|VE1PR08MB4863: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8882;OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: fyt1PdhBJRuP3wW2NUZqSHVRxOOVCsQcvm1++CYR7qZTkexl0TJPYgq86bmc90vT2GrlVSgIvPnBsZzq5jSknb/LPJ2hn4qE/1lBTGC4X0RNSglZuZvO3hhQSoThnzFukQVdamkqK9h77itPuNEIetEQ+i6gFt7Tov+qOdgi1wmjXHoE1zCGlAKwtwwxCDMDKRKoxC/bDlO0RaIcjC3+bWj+0iANlRZ/SRpIkJQdGRajFgRzUGbmUoJX/v20DKEKexD2wXg8hkX4dcnvHifbBB/Am9K2ts+1+/0D07jAV33RuHr0PkTQQpotcagd+t8P1V53AcNHAmtPcDqn0qRzug2P5TQH/oq2lcwz4cRBRusyadROpfWyDayT75L3ylHiGfBpv4eovnYiFfGdavsnmAZuf8TPV4YrQnK22OgZ2ssMBg8R6LRW4ASKaNnR5kyCYY7jqszjPQvXUfDtrY7yNGwsaKjn2aD1O3+3nKD6WVfsMq9N6ImM0mNx46o0I2HlA5YHPLdVrYXz7nl8MtJUCE6ZkhdVCd1xNUzCywsYYOZvyzaTQZbMntdZyvtN+afsUZg+kEHIfJU/zZC9uXa12g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2992 Original-Authentication-Results: spf=pass (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=bestguesspass action=none header.from=arm.com; X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT030.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 45e3ed06-f9fa-43a1-1507-08d7d3f3d620 X-Microsoft-Antispam-Message-Info: TIYlC+Bby7U37Jk3OmTXnaqGKvXe5WR4ckI9fDYC9/8bTRZbU17w5g3eEcG6fGfpH+sTwMDex26otA0GJ5tuKj2Vc3CFnOND/F5Yr6jvBoggU/+lvsK1d7qjHs/fg1kvP9Uo/oIyK/9viouEvmoBHT/MpOSXMXt25d61nq0zVLrci1yJz+7W3Nl+QUp8qWvsXEYgU8C2RRV86kJC961fFOFY7aplHWUp+fVL1n/x3HH0S+PjVZvPSBncTbJevlD33zjMnWAUEN4Zwv4qTlNb3qn1sCnDHqvGO2hbhfDPKwnY2XaxIwx6ZtMgmHDvovGs7JLDUwoVmSlHzf29derSx+R+NMgJ7sKgKOSwtw2cDNbtRGB6yLynIhbvi0Gm6R5ITkthLfHlAt+UZfIQAyJnm/oK/u7CeXt40PDIJNdAnLk7rO6+JgQyB1+keORZhGH9QT0NhPCMMOYTO1wiqWWMFG+XpehJERC5YMSC2+2Cks5siMCpobCP3hsr4b767HzS7IgFlawcUTGqGrId66W/DyvWjuWt5hw7HyjHyEK2/ReQ1hi30uM/HSLQFMtZE5neH6DPy4LU9PCuTMIUdYW9BA== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Mar 2020 15:14:19.1992 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e42a8d82-8d31-4990-a574-08d7d3f3da82 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: VE1PR08MB4863 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 X-Gm-Message-State: XQEunv4uezwD05EV8d9HGXMtx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1585494863; bh=APTDRHA2OQqYtrrl7M9M4w8UjjcXFsI4e47XUIACgj8=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=gvH+mcrEPBatCxZOcsFzOPyhSEdYgu2J9P9XaCYXLEmaZjDgwWw24AeSEECmeuPkfcT X6Rdudtj04/OLcbjdCLvYcXITdZNpetnlGt88vHb9unsy6S0k+j9JwTmg0wsDY0WD38YV Xzy543EnBBaKdmhKONhIo9ZilnrZ0OkEiOc= 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 --- Notes: v2: Splitting patch series and re-submitting DynamicTablesPkg [SAMI] patches from https://edk2.groups.io/g/devel/message/46261 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 (#56575): https://edk2.groups.io/g/devel/message/56575 Mute This Topic: https://groups.io/mt/72631553/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-