From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web08.1111.1610584320535817795 for ; Wed, 13 Jan 2021 16:32:00 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=icRH/y8d; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: yuwei.chen@intel.com) IronPort-SDR: oq2f8JDpeVw0v8vl64OP8Fxw4Ji0HpTCD8+3VxgU+TqQlW0AleriVlfkhpeo0A65shGHbOTEHH Hred7Wb4a1ZQ== X-IronPort-AV: E=McAfee;i="6000,8403,9863"; a="263078850" X-IronPort-AV: E=Sophos;i="5.79,345,1602572400"; d="scan'208";a="263078850" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2021 16:31:57 -0800 IronPort-SDR: /XnY1l0l20vzQ6Ifm5IfqYO/0PjVbWQ5xcNWxXhPPjtKXgZc0pavVMS0GhzEr//098pwOCZ4hd SLpIJ3BqzWQg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,345,1602572400"; d="scan'208";a="353683695" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by fmsmga008.fm.intel.com with ESMTP; 13 Jan 2021 16:31:57 -0800 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 13 Jan 2021 16:31:56 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 13 Jan 2021 16:31:56 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Wed, 13 Jan 2021 16:31:55 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QnhC1BQadXIrtgiFhgI2PEIUA8HyYit2dGXx6ttSsNY+ollFmVCr2zTlHhY2N0gvUn1JUk/17l+LMeGlHIVNGHx98x2TQ7JvhRp6BhKrMKGuV3Qrfy6eniKyidT7hZt9o1OQWdB5K3m+NEUKYn0zGbBRJ5b/qQDwceJgl4TwjZjI3onvvar/hwi50BPS9auXMAFw3pDPnNnpjENWdSxAdxHKSmh3i6KwlbRsd8Oz82ope6oAu+GxcWV13jzb/BwssIels88RmaWer9vJ4K681NZwcFKv9Av8J2n0rLhudKRFICmpKupA691wwfK91PvAs6Ryf6XoZQzyPKHMxAYDZg== 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=EUd2w+niZIAKoX+LvbfGeqvPOM3N7XnSjZorlTQV1ow=; b=eFWJV60dbaNn/b9ZWfG6jAh2ukJJpKEQdfmNcxHha3jUF40GfEekrSGx0XFzmkUwkMbs3NpzVUMZniOI/qtJLW8uvvuEu9M8Sv/T3cIw4SMXhGDjva6TIdNOWuSRLqNL3Ty8wsKFScCvF2VTKbVkkxDmeSNkmgXHEYeJH65d1aPcCECcsSb+CtlXsb1aTVam2f4LRJLrjgjwmfSnswEK6Oc4KbUQIR35HoYUqnRWEpq6pY3EOPb+M9uvit5xyjHcDFwuVPByDX8Ko7PU9tZGrF527JXKqT6lTlB8TLKDCV5FEoNGAOgcIOr0/+1PDDQDTes74ewczxkQAG9PnGkOgw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EUd2w+niZIAKoX+LvbfGeqvPOM3N7XnSjZorlTQV1ow=; b=icRH/y8dsaXJ5DQaBg9/JkVLA/mbw5lfOOeLDUC5bG8KOB1FNGL0YGp73/pCTXYlgq61R12KNQq0jIFO1/GN2oeLwiBWYbQLKuaBfbrBFDZpE4l+SRq6LPDLW5URKhixS+3rAadpMiDd3A/Tw9Z3SSQbJ+nwvyV9k8RduZICKPU= Received: from DM5PR11MB1594.namprd11.prod.outlook.com (2603:10b6:4:5::16) by DM6PR11MB4706.namprd11.prod.outlook.com (2603:10b6:5:2a5::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6; Thu, 14 Jan 2021 00:31:54 +0000 Received: from DM5PR11MB1594.namprd11.prod.outlook.com ([fe80::59f7:5329:fc62:a3be]) by DM5PR11MB1594.namprd11.prod.outlook.com ([fe80::59f7:5329:fc62:a3be%9]) with mapi id 15.20.3763.010; Thu, 14 Jan 2021 00:31:54 +0000 From: "Yuwei Chen" To: "Feng, Bob C" , "devel@edk2.groups.io" CC: Liming Gao Subject: Re: [Patch 1/1] BaseTools: Fix the build report crash issue Thread-Topic: [Patch 1/1] BaseTools: Fix the build report crash issue Thread-Index: AQHW49LAipNnBWoN1EibDKqD5s3kn6omUXUw Date: Thu, 14 Jan 2021 00:31:54 +0000 Message-ID: References: <20210106022157.1748-1-bob.c.feng@intel.com> In-Reply-To: <20210106022157.1748-1-bob.c.feng@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.36] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: eb17e30c-ff84-4462-f15b-08d8b823cb37 x-ms-traffictypediagnostic: DM6PR11MB4706: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:341; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 6N5wMmtTYsJMMrSCEW8y4n0Pt6vQc8GopUGvV4RQqTnJYFcR+5Fl+HE7TVOkPC7ThhGFkBF5BF6EDlkyxKGuMgcSU5JR2fqc89Wu607bTinYV1AtlqHNJDXcJhgxaS3F3TZoVO4e6nHZgruX1DPiwJjimtg+XsyKAX22iypXrnHHQvsD/tzyesZCFhW7kUAZjV+Cn7AL6kF52/0z7HCmt0NtY3lrgCVHtrZY43OpxhNNZ25z/pnbIiy+KMFuVovaMBS+Sv+qyzemwciAqe1UQr2YZO1NHC787jXHT+qgtraLnH2WBuOAUNPGdmKcQT1TsbwCljZj7LFy8DezX/NYbCHObKG/TGOq1tUCjXxNOlJEobx1gxN5V9YrklfZrLpnFMmUxINg/AcvfCdyxjhkmQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR11MB1594.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(136003)(366004)(346002)(376002)(39860400002)(55016002)(110136005)(52536014)(9686003)(5660300002)(2906002)(76116006)(26005)(7696005)(66476007)(66446008)(8936002)(64756008)(186003)(316002)(33656002)(71200400001)(83380400001)(53546011)(8676002)(86362001)(6506007)(66946007)(478600001)(66556008)(4326008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?y3/yp002WrZme4KDMApcKP6xlEd2LL8am//z8tOOvQDaVL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YbfIeQC5iTnqYuKHO3bqItL97ehAihqW51VQm0?= =?us-ascii?Q?AqvPFIrKn0baKJb4XJt5yX+5aeR8RNO2hTOnJxHIfs0=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM5PR11MB1594.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: eb17e30c-ff84-4462-f15b-08d8b823cb37 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Jan 2021 00:31:54.4313 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 98mtAh4oJrPJfMs6v/QU9olP6kQM5bzYbvQr2RW9ooXDBACuvjlhIukga+XRT+AVjmVprJugps8IyU0OwWpeZw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4706 Return-Path: yuwei.chen@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Yuwei Chen > -----Original Message----- > From: Feng, Bob C > Sent: Wednesday, January 6, 2021 10:22 AM > To: devel@edk2.groups.io > Cc: Liming Gao ; Chen, Christine > > Subject: [Patch 1/1] BaseTools: Fix the build report crash issue >=20 > In the following corner case, the build report will crash. This patch is = to fix > this problem. >=20 > Case: > Multiple SKU are used and 2 more DynamicHii structure Pcds are set in dsc > file under different SKU. And 1 more of those Pcds are not used in any IN= F file. >=20 > Signed-off-by: Bob Feng > Cc: Liming Gao > Cc: Yuwei Chen > --- > BaseTools/Source/Python/build/BuildReport.py | 16 +++++++++------- > 1 file changed, 9 insertions(+), 7 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/build/BuildReport.py > b/BaseTools/Source/Python/build/BuildReport.py > index 3b1add9999d2..468772930ca1 100644 > --- a/BaseTools/Source/Python/build/BuildReport.py > +++ b/BaseTools/Source/Python/build/BuildReport.py > @@ -1123,14 +1123,15 @@ class PcdReport(object): > for Sku in SkuList: > SkuInfo =3D Pcd.SkuInfoList[= Sku] > if SkuInfo.DefaultStoreDict: > DefaultStoreList =3D > sorted(SkuInfo.DefaultStoreDict.keys()) > for DefaultStore in Defa= ultStoreList: > - OverrideValues =3D P= cd.SkuOverrideValues[Sku] > - DscOverride =3D > self.ParseStruct(OverrideValues[DefaultStore]) > - if DscOverride: > - break > + OverrideValues =3D > Pcd.SkuOverrideValues.get(Sku) > + if OverrideValues: > + DscOverride =3D > self.ParseStruct(OverrideValues[DefaultStore]) > + if DscOverride: > + break > if DscOverride: > break > if DscOverride: > DscDefaultValue =3D True > DscMatch =3D True @@ -1386,13 +1387,14 @= @ class > PcdReport(object): > FileWrite(File, ' %-*s : %6s %= 10s %10s =3D %s' % > (self.MaxLen, ' ', TypeName, '(' + Pcd.DatumType + ')', '(' + DefaultStor= e + ')', > Value)) > else: > FileWrite(File, ' %-*s : %6s %= 10s %10s %10s =3D %s' % > (self.MaxLen, ' ', TypeName, '(' + Pcd.DatumType + ')', '(' + SkuIdName += ')', '(' > + DefaultStore + ')', Value)) > FileWrite(File, '%*s: %s: %s' % (self.MaxLen= + 4, > SkuInfo.VariableGuid, SkuInfo.VariableName, SkuInfo.VariableOffset)) > if IsStructure: > - OverrideValues =3D Pcd.SkuOverrideValues= [Sku] > - OverrideFieldStruct =3D self.OverrideFie= ldValue(Pcd, > OverrideValues[DefaultStore]) > - self.PrintStructureInfo(File, OverrideFi= eldStruct) > + OverrideValues =3D Pcd.SkuOverrideValues= .get(Sku) > + if OverrideValues: > + OverrideFieldStruct =3D self.Overrid= eFieldValue(Pcd, > OverrideValues[DefaultStore]) > + self.PrintStructureInfo(File, > + OverrideFieldStruct) > self.PrintPcdDefault(File, Pcd, IsStructure,= DscMatch, > DscDefaultValue, InfMatch, InfDefaultValue, DecMatch, DecDefaultValue) > else: > Value =3D SkuInfo.DefaultValue > IsByteArray, ArrayList =3D ByteArrayForamt(Value) > if Pcd.DatumType =3D=3D 'BOOLEAN': > -- > 2.29.1.windows.1