From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=195.135.221.5; helo=smtp.nue.novell.com; envelope-from=glin@suse.com; receiver=edk2-devel@lists.01.org Received: from smtp.nue.novell.com (smtp.nue.novell.com [195.135.221.5]) (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 D957E207E53F7 for ; Tue, 8 May 2018 18:48:48 -0700 (PDT) Received: from emea4-mta.ukb.novell.com ([10.120.13.87]) by smtp.nue.novell.com with ESMTP (TLS encrypted); Wed, 09 May 2018 03:48:46 +0200 Received: from GaryWorkstation (nwb-a10-snat.microfocus.com [10.120.13.201]) by emea4-mta.ukb.novell.com with ESMTP (TLS encrypted); Wed, 09 May 2018 02:48:21 +0100 Date: Wed, 9 May 2018 09:48:16 +0800 From: Gary Lin To: "Bi, Dandan" Cc: "edk2-devel@lists.01.org" , "Dong, Eric" , "Gao, Liming" Message-ID: <20180509014816.6l6sxggpmsaqrxzd@GaryWorkstation> References: <20180410075447.121560-1-dandan.bi@intel.com> <20180508094500.veagpp2wuhx5jl47@GaryWorkstation> <3C0D5C461C9E904E8F62152F6274C0BB3BAD1313@shsmsx102.ccr.corp.intel.com> MIME-Version: 1.0 In-Reply-To: <3C0D5C461C9E904E8F62152F6274C0BB3BAD1313@shsmsx102.ccr.corp.intel.com> User-Agent: NeoMutt/20170912 (1.9.0) Subject: Re: [patch 1/2] BaseTools/VfrCompile:Fix memory leak issues X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2018 01:48:49 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, May 08, 2018 at 11:50:46AM +0000, Bi, Dandan wrote: > Yes. We have submitted patch to fix it. Sorry for the inconvenience. > Awesome! Thanks for the quick response :) Gary Lin > Thanks, > Dandan > > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Gary Lin > Sent: Tuesday, May 8, 2018 5:46 PM > To: Bi, Dandan > Cc: edk2-devel@lists.01.org; Dong, Eric ; Gao, Liming > Subject: Re: [edk2] [patch 1/2] BaseTools/VfrCompile:Fix memory leak issues > > On Tue, Apr 10, 2018 at 03:54:46PM +0800, Dandan Bi wrote: > > Cc: Eric Dong > > Cc: Liming Gao > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Dandan Bi > > --- > > BaseTools/Source/C/VfrCompile/VfrSyntax.g | 32 > > ++++++++++++++++++++++++++++++- > > 1 file changed, 31 insertions(+), 1 deletion(-) > > > > diff --git a/BaseTools/Source/C/VfrCompile/VfrSyntax.g > > b/BaseTools/Source/C/VfrCompile/VfrSyntax.g > > index d48072a8adf..4b0a43606ea 100644 > > --- a/BaseTools/Source/C/VfrCompile/VfrSyntax.g > > +++ b/BaseTools/Source/C/VfrCompile/VfrSyntax.g > Hi Dandan, > > I encountered a build error with our build service: > > [ 197s] "VfrCompile" -l -n --string-db /home/abuild/rpmbuild/BUILD/ovmf-2018+git1525681922.053cd183c9f2/Build/OvmfX64/DEBUG_GCC5/X64/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib/OUTPUT/BootMaintenanceManagerUiLibStrDefs.hpk --output-directory /home/abuild/rpmbuild/BUILD/ovmf-2018+git1525681922.053cd183c9f2/Build/OvmfX64/DEBUG_GCC5/X64/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib/DEBUG/. /home/abuild/rpmbuild/BUILD/ovmf-2018+git1525681922.053cd183c9f2/Build/OvmfX64/DEBUG_GCC5/X64/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib/OUTPUT/BootMaintenanceManager.i > [ 197s] *** Error in `/home/abuild/rpmbuild/BUILD/ovmf-2018+git1525681922.053cd183c9f2/BaseTools/Source/C/bin/VfrCompile': free(): invalid pointer: 0xbabababababababa *** > > If I reverted the following change, the package can be built again. > > > @@ -5055,11 +5082,14 @@ EfiVfrParser::_SAVE_OPHDR_COND ( VOID > > EfiVfrParser::_CLEAR_SAVED_OPHDR ( > > VOID > > ) > > { > > - mCIfrOpHdr[mCIfrOpHdrIndex] = NULL; > > + if (mCIfrOpHdr[mCIfrOpHdrIndex] != NULL) { > > + delete mCIfrOpHdr[mCIfrOpHdrIndex]; > > + mCIfrOpHdr[mCIfrOpHdrIndex] = NULL; > > + } > > mCIfrOpHdrLineNo[mCIfrOpHdrIndex] = 0; } > > > > BOOLEAN > > EfiVfrParser::_SET_SAVED_OPHDR_SCOPE ( > > I have no clue now and it happened all the time. > > Would you mind to check the code? > > Thanks, > > Gary Lin > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel >