From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 71170207E36CB for ; Tue, 8 May 2018 04:50:50 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 May 2018 04:50:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,378,1520924400"; d="scan'208";a="53386244" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga001.fm.intel.com with ESMTP; 08 May 2018 04:50:49 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 8 May 2018 04:50:49 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 8 May 2018 04:50:49 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.79]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.179]) with mapi id 14.03.0319.002; Tue, 8 May 2018 19:50:47 +0800 From: "Bi, Dandan" To: Gary Lin CC: "edk2-devel@lists.01.org" , "Dong, Eric" , "Gao, Liming" Thread-Topic: [edk2] [patch 1/2] BaseTools/VfrCompile:Fix memory leak issues Thread-Index: AQHT0KFKICFYJpUPdEqRiRudUmCB/qQlO1GAgACogAA= Date: Tue, 8 May 2018 11:50:46 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB3BAD1313@shsmsx102.ccr.corp.intel.com> References: <20180410075447.121560-1-dandan.bi@intel.com> <20180508094500.veagpp2wuhx5jl47@GaryWorkstation> In-Reply-To: <20180508094500.veagpp2wuhx5jl47@GaryWorkstation> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.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: Tue, 08 May 2018 11:50:50 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Yes. We have submitted patch to fix it. Sorry for the inconvenience. 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=20 > ++++++++++++++++++++++++++++++- > 1 file changed, 31 insertions(+), 1 deletion(-) >=20 > diff --git a/BaseTools/Source/C/VfrCompile/VfrSyntax.g=20 > 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-20= 18+git1525681922.053cd183c9f2/Build/OvmfX64/DEBUG_GCC5/X64/MdeModulePkg/Lib= rary/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib/OUTPUT/BootMai= ntenanceManagerUiLibStrDefs.hpk --output-directory /home/abuild/rpmbuild/BU= ILD/ovmf-2018+git1525681922.053cd183c9f2/Build/OvmfX64/DEBUG_GCC5/X64/MdeMo= dulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib/DEB= UG/. /home/abuild/rpmbuild/BUILD/ovmf-2018+git1525681922.053cd183c9f2/Build= /OvmfX64/DEBUG_GCC5/X64/MdeModulePkg/Library/BootMaintenanceManagerUiLib/Bo= otMaintenanceManagerUiLib/OUTPUT/BootMaintenanceManager.i [ 197s] *** Error in `/home/abuild/rpmbuild/BUILD/ovmf-2018+git1525681922.= 053cd183c9f2/BaseTools/Source/C/bin/VfrCompile': free(): invalid pointer: 0= xbabababababababa *** If I reverted the following change, the package can be built again. > @@ -5055,11 +5082,14 @@ EfiVfrParser::_SAVE_OPHDR_COND ( VOID =20 > EfiVfrParser::_CLEAR_SAVED_OPHDR ( > VOID > ) > { > - mCIfrOpHdr[mCIfrOpHdrIndex] =3D NULL; > + if (mCIfrOpHdr[mCIfrOpHdrIndex] !=3D NULL) { > + delete mCIfrOpHdr[mCIfrOpHdrIndex]; > + mCIfrOpHdr[mCIfrOpHdrIndex] =3D NULL; > + } > mCIfrOpHdrLineNo[mCIfrOpHdrIndex] =3D 0; } > =20 > 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