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.93; helo=mga11.intel.com; envelope-from=jian.j.wang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 E16952117CE8C for ; Mon, 22 Oct 2018 00:12:50 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Oct 2018 00:12:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,411,1534834800"; d="scan'208";a="90227852" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by FMSMGA003.fm.intel.com with ESMTP; 22 Oct 2018 00:12:50 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 22 Oct 2018 00:12:50 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 22 Oct 2018 00:12:49 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.224]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.21]) with mapi id 14.03.0319.002; Mon, 22 Oct 2018 15:12:48 +0800 From: "Wang, Jian J" To: "Zeng, Star" , "edk2-devel@lists.01.org" CC: "Kinney, Michael D" , "Ni, Ruiyu" , "Yao, Jiewen" , Laszlo Ersek Thread-Topic: [edk2] [PATCH 3/3] MdeModulePkg/Core: add use-after-free memory detection Thread-Index: AQHUZ04yDM8+MiGRvEexlNQFNV1LQKUqEAGAgAC2bHA= Date: Mon, 22 Oct 2018 07:12:46 +0000 Message-ID: References: <20181019015013.7488-1-jian.j.wang@intel.com> <20181019015013.7488-4-jian.j.wang@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjE4MzE4NGEtNGE1My00YzMxLWEyMjgtMTQ4ZTlmNGMwZjhhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiMkhIcnRkRDVLUU5tQm9uR2N4TXg2WnBmc0tvU3dTYzVYeGx3TitZNjJDU1pKbkxEdmJ6aFd0TW11SHFQME16RCJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 3/3] MdeModulePkg/Core: add use-after-free memory detection 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: Mon, 22 Oct 2018 07:12:51 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 U3RhciwNCg0KVGhhbmtzIGZvciB0aGUgY29tbWVudC4gUGxlYXNlIHNlZSBteSBvcGluaW9ucyBi ZWxvdy4NCg0KUmVnYXJkcywNCkppYW4NCg0KDQo+IC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0t DQo+IEZyb206IF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