From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.151; helo=mga17.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6888121168225 for ; Fri, 19 Oct 2018 07:32:14 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Oct 2018 07:32:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,400,1534834800"; d="scan'208";a="101606163" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga002.jf.intel.com with ESMTP; 19 Oct 2018 07:32:13 -0700 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.16]) by FMSMSX106.amr.corp.intel.com ([169.254.5.133]) with mapi id 14.03.0319.002; Fri, 19 Oct 2018 07:32:13 -0700 From: "Carsey, Jaben" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [Patch] BaseTools: Fix the crash issue when Dynamic structure Pcd use in FDF Thread-Index: AQHUZ3xSEGCZNDQRMkCb2bIG3wbgeaUmog4Q Date: Fri, 19 Oct 2018 14:32:12 +0000 Message-ID: References: <1539933649-9672-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1539933649-9672-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTdiMzFiOTItM2IwMS00YjlhLTlmZGUtMWVhYjhhNTk2Y2ZlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoid3kzdWhKNnNCUHM4QlNCcnYwRVhDaGJndzJPdkprMHBUSThpY3hyTk8zUENBeHVjMEZ4ckNRWXpVUU9vbTZJQiJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.1.200.108] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: Fix the crash issue when Dynamic structure Pcd use in FDF X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Oct 2018 14:32:14 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jaben Carsey > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Yonghong Zhu > Sent: Friday, October 19, 2018 12:21 AM > To: edk2-devel@lists.01.org > Subject: [edk2] [Patch] BaseTools: Fix the crash issue when Dynamic > structure Pcd use in FDF >=20 > The case is use Dynamic structure Pcd in the FDF file. > Current code already save the Guid, Name and Filed info for those Pcd, > but it directly use the dict key as [Name, Guid] and cause this crash > issue. >=20 > Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1264 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Yonghong Zhu > --- > BaseTools/Source/Python/AutoGen/AutoGen.py | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py > b/BaseTools/Source/Python/AutoGen/AutoGen.py > index f2146a7..804f579 100644 > --- a/BaseTools/Source/Python/AutoGen/AutoGen.py > +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py > @@ -567,12 +567,12 @@ class WorkspaceAutoGen(AutoGen): > if (Name, Guid) not in DecPcds: > EdkLogger.error( > 'build', > PARSER_ERROR, > "PCD (%s.%s) used in FDF is not declared in DEC = files." % (Guid, > Name), > - File =3D self.FdfProfile.PcdFileLineDict[Name, G= uid][0], > - Line =3D self.FdfProfile.PcdFileLineDict[Name, G= uid][1] > + File =3D self.FdfProfile.PcdFileLineDict[Name, G= uid, Fileds][0], > + Line =3D self.FdfProfile.PcdFileLineDict[Name, G= uid, Fileds][1] > ) > else: > # Check whether Dynamic or DynamicEx PCD used in FDF= file. If > used, build break and give a error message. > if (Name, Guid, TAB_PCDS_FIXED_AT_BUILD) in DecPcdsK= ey \ > or (Name, Guid, TAB_PCDS_PATCHABLE_IN_MODULE) in > DecPcdsKey \ > @@ -581,12 +581,12 @@ class WorkspaceAutoGen(AutoGen): > elif (Name, Guid, TAB_PCDS_DYNAMIC) in DecPcdsKey or= (Name, > Guid, TAB_PCDS_DYNAMIC_EX) in DecPcdsKey: > EdkLogger.error( > 'build', > PARSER_ERROR, > "Using Dynamic or DynamicEx type of PCD = [%s.%s] in FDF file > is not allowed." % (Guid, Name), > - File =3D self.FdfProfile.PcdFileLineDict= [Name, Guid][0], > - Line =3D self.FdfProfile.PcdFileLineDict= [Name, Guid][1] > + File =3D self.FdfProfile.PcdFileLineDict= [Name, Guid, Fileds][0], > + Line =3D self.FdfProfile.PcdFileLineDict= [Name, Guid, Fileds][1] > ) >=20 > Pa =3D PlatformAutoGen(self, self.MetaFile, Target, Toolchai= n, Arch) > # > # Explicitly collect platform's dynamic PCDs > -- > 2.6.1.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel