From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.121]) by mx.groups.io with SMTP id smtpd.web11.203.1587357292898682914 for ; Sun, 19 Apr 2020 21:34:53 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=FKd6cer2; spf=pass (domain: microsoft.com, ip: 40.107.220.121, mailfrom: bret.barkelew@microsoft.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RnTwVBCSHLXAi8Mo39HxXz51nlb1Fo/fDCrUH/1HO7P2CJuZ0/nQTxVmy9aZQmRS8ycHXyQZmREDsAXZ26eK4klXjtyfg0WhBVcEqv/mosFCJLY2pl8AOy6Go13cOBayqUX3sknU7/IZcJ9SEvtt9MRDNpuGIz5NH7BgPWMsNoWkVi1f4XTCVMKX+avY3B+2vi2fxwEXs/GsmnhWYgnBxqDPinmP8DjdG8WPmi0T0hzBcU94ARPIv1NYYoetk5/Bf0AbqAz2DC/RNvi8n9sBJNUUoD4z8DqcjeFDDC/oscRSVhSILxJKFohibt6dvZBAzGn1tFfGN+oXbwCIEs0TJQ== 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=saM5zsIhFGwdqDH0MWChpjwd/BFSaMQ2Lt5/G86V7Gs=; b=g44TxThnXxcCumJEo4bq/uYadryo2Klgn67i3Hu+VKG07xLmUZqBOiVfDYfuYsL7fC2FzhpPl7CfiBgbd5IXhUv9uPx9iCqfBH7iPV9CKJBZU0PPWjdPoqLZTD/4/0ryIkhucqkINY5zM+JK9tgW0qqWu/nH8bre+lBOdd1LzNklEr6byNcX19iAet/rA5YbcnzJag+oIEmLGjboqn4Uz8vmeh9RWPF5/CMlhQA5xowGiwijTptOMbfzYQ6KU9jJ+5FdKUyYwyeRWZ/tKq3wfuct/nJOXMcvLHen4NDS1SmxgMBXh0JujJgQ+aAT//w8diD8sgSzE6no6l0+SOqFOw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=saM5zsIhFGwdqDH0MWChpjwd/BFSaMQ2Lt5/G86V7Gs=; b=FKd6cer2wfOPw9bC4sFwBf+U2bdi4WAb9DYmeVsv9OCOmNzqx6kWU/j3jLMNiTW4aM6k9G2udMQWiHt3y94yfn3csYyB0qu3yezBOeTlmH1iOiwWc0VlR0l4/vBFUDGnzAeCOkz7LDr+fxNLecGJ/EVo/XG7XZZ7SIBhy1NMP9U= Received: from CY4PR21MB0743.namprd21.prod.outlook.com (2603:10b6:903:b2::9) by MW2SPR01MB06.namprd21.prod.outlook.com (2603:10b6:302:10::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.2; Mon, 20 Apr 2020 04:34:51 +0000 Received: from CY4PR21MB0743.namprd21.prod.outlook.com ([fe80::90d:10d9:c5bc:5318]) by CY4PR21MB0743.namprd21.prod.outlook.com ([fe80::90d:10d9:c5bc:5318%12]) with mapi id 15.20.2958.001; Mon, 20 Apr 2020 04:34:51 +0000 From: "Bret Barkelew" To: "devel@edk2.groups.io" , "guomin.jiang@intel.com" CC: Kun Qin , "Kinney, Michael D" , Sean Brogan Subject: Re: [edk2-devel] [PATCH v2] UnitTestFrameworkPkg/UnitTestLib: Correct dereferred pointer Thread-Topic: [edk2-devel] [PATCH v2] UnitTestFrameworkPkg/UnitTestLib: Correct dereferred pointer Thread-Index: AQHWEfy2yrpfv/rnz0GO+lwBs4cFxaiBc19QgAACo/E= Date: Mon, 20 Apr 2020 04:34:51 +0000 Message-ID: References: <16058BA3AE571281.11156@groups.io>, In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2020-04-20T04:34:34.1263916Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Privileged authentication-results: spf=none (sender IP is ) smtp.mailfrom=Bret.Barkelew@microsoft.com; x-originating-ip: [71.212.145.195] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: cefa11cd-f8a3-43ca-20ce-08d7e4e42a9e x-ms-traffictypediagnostic: MW2SPR01MB06:|MW2SPR01MB06:|MW2SPR01MB06: x-ms-exchange-transport-forked: True x-ld-processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:595; x-forefront-prvs: 03793408BA x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY4PR21MB0743.namprd21.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(39860400002)(366004)(396003)(136003)(346002)(376002)(110136005)(82950400001)(82960400001)(54906003)(186003)(71200400001)(9686003)(55016002)(8990500004)(81156014)(8676002)(52536014)(107886003)(66556008)(64756008)(2906002)(66946007)(66476007)(33656002)(8936002)(4326008)(66446008)(76116006)(5660300002)(6506007)(316002)(966005)(478600001)(26005)(7696005)(86362001)(10290500003)(53546011);DIR:OUT;SFP:1102; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x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fIfpD4CMLFDOXptXjjyFsbHXckleh16ew03J1CfXcAGkUxIZsrUTRM3UAlsnoiUllz+Zzql9LprK6DYDIvazI03OSklYP2m7CjiY4c8jQeaVRZeJbNVrJennc8HIjM+0Eg2mm2nEfxfbe6oU8Ayr+/CMhGQL45u9nEFVmCUEav7RHl6En9rSZUcA32WOsOSuQ8gVf5p4Z0e2kp9ipxlLFjyj8d23hxwu0lNY1kcneYikXylQtkAIW0BIArmmjREf/2Ckb/tJ/rzCYb3eYoWxA/Kbko6l5rGOKX4tnfHciFrhKjuDjcXKVQmUanxuk6YjhccIzukjtfDKW5qqvYvEH8/QReVr05bOOIGYSznNVs9os= MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: cefa11cd-f8a3-43ca-20ce-08d7e4e42a9e X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Apr 2020 04:34:51.3272 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 5hkkAYv/HudbASPR6IvQh/O2jvolgdrv1virgWvcL6l7yxS8aeQkcLg28kKk5gZqmtay9UyHP9DKmvfsqlEM/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2SPR01MB06 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_CY4PR21MB07436AC506EA966A863488AAEFD40CY4PR21MB0743namp_" --_000_CY4PR21MB07436AC506EA966A863488AAEFD40CY4PR21MB0743namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Bret Barkelew - Bret ________________________________ From: devel@edk2.groups.io on behalf of Guomin Jian= g via groups.io Sent: Sunday, April 19, 2020 9:30:57 PM To: devel@edk2.groups.io ; Jiang, Guomin Cc: Kun Qin ; Kinney, Michael D ; Sean Brogan ; Bret Barkelew Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v2] UnitTestFrameworkPkg/UnitT= estLib: Correct dereferred pointer Hi Michael, Sean, Bret, Please help review the change. Best Regards guomin > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Guomin > Jiang > Sent: Tuesday, April 14, 2020 9:33 AM > To: devel@edk2.groups.io > Cc: kuqin ; Kinney, Michael D > ; Sean Brogan ; > Bret Barkelew > Subject: [edk2-devel] [PATCH v2] UnitTestFrameworkPkg/UnitTestLib: > Correct dereferred pointer > > From: kuqin > > REF: https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2= Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2609&data=3D02%7C01%7CBre= t.Barkelew%40microsoft.com%7C42a07ae2da8047642dbe08d7e4e3a195%7C72f988bf86f= 141af91ab2d7cd011db47%7C1%7C0%7C637229538634306948&sdata=3DLnkRj186gkkT= 52eyVRrC6WeabUpQK4fqGfJ8zRGJpH8%3D&reserved=3D0 > > SavedState is not sticky, copied pointer update will not change source > pointer > > Cc: Michael D Kinney > Cc: Sean Brogan > Cc: Bret Barkelew > Signed-off-by: Guomin Jiang > --- > UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c > b/UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c > index b136992d99..ba4b18568d 100644 > --- a/UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c > +++ b/UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c > @@ -209,7 +209,6 @@ InitUnitTestFramework ( > EFI_STATUS Status; UNIT_TEST_FRAMEWORK_HANDLE > NewFrameworkHandle; UNIT_TEST_FRAMEWORK *NewFramework;- > UNIT_TEST_SAVE_HEADER *SavedState; Status =3D EFI_SUCCESS= ; > NewFramework =3D NULL;@@ -264,8 +263,7 @@ InitUnitTestFramework ( > // If there is a persisted context, load it now. // if (DoesCache= Exist > (NewFrameworkHandle)) {- SavedState =3D (UNIT_TEST_SAVE_HEADER > *)NewFramework->SavedState;- Status =3D LoadUnitTestCache > (NewFrameworkHandle, &SavedState);+ Status =3D LoadUnitTestCache > (NewFrameworkHandle, (UNIT_TEST_SAVE_HEADER**)(&NewFramework- > >SavedState)); if (EFI_ERROR (Status)) { // // Don't act= ually report it > as an error, but emit a warning.-- > 2.25.1.windows.1 > > > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > > View/Reply Online (#57288): https://nam06.safelinks.protection.outlook.c= om/?url=3Dhttps%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Fmessage%2F57288&da= ta=3D02%7C01%7CBret.Barkelew%40microsoft.com%7C42a07ae2da8047642dbe08d7e4e3= a195%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637229538634316946&sd= ata=3DPEomgQB9WlQXGut1oqdWdNt%2BbBNTAGv3HHRcv8eo8QM%3D&reserved=3D0 > Mute This Topic: https://nam06.safelinks.protection.outlook.com/?url=3Dh= ttps%3A%2F%2Fgroups.io%2Fmt%2F73002073%2F4399222&data=3D02%7C01%7CBret.= Barkelew%40microsoft.com%7C42a07ae2da8047642dbe08d7e4e3a195%7C72f988bf86f14= 1af91ab2d7cd011db47%7C1%7C0%7C637229538634316946&sdata=3DvtcVI4gP7UjLhQ= MuAc1JO%2B3yRrWAysPB7tuqsZLmj6s%3D&reserved=3D0 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://nam06.safelinks.protection.outlook.com/?url=3Dhttps= %3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Funsub&data=3D02%7C01%7CBret.Barke= lew%40microsoft.com%7C42a07ae2da8047642dbe08d7e4e3a195%7C72f988bf86f141af91= ab2d7cd011db47%7C1%7C0%7C637229538634316946&sdata=3DsnyZZwLcC1sDGE6ov2u= GT8MPM%2FHsBi0yKP0z5FpFMIU%3D&reserved=3D0 > [guomin.jiang@intel.com] -=3D-=3D-=3D-=3D-=3D-=3D --_000_CY4PR21MB07436AC506EA966A863488AAEFD40CY4PR21MB0743namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Reviewed-by: Bret Barkelew <bret.barkelew@micros= oft.com>

 

- Bret

 


From: devel@edk2.groups.io= <devel@edk2.groups.io> on behalf of Guomin Jiang via groups.io <g= uomin.jiang=3Dintel.com@groups.io>
Sent: Sunday, April 19, 2020 9:30:57 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>; Jiang, Guomi= n <guomin.jiang@intel.com>
Cc: Kun Qin <Kun.Qin@microsoft.com>; Kinney, Michael D <mi= chael.d.kinney@intel.com>; Sean Brogan <sean.brogan@microsoft.com>= ; Bret Barkelew <Bret.Barkelew@microsoft.com>
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v2] UnitTestFrameworkPk= g/UnitTestLib: Correct dereferred pointer
 
Hi Michael, Sean, Bret,

Please help review the change.

Best Regards
guomin

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of = Guomin
> Jiang
> Sent: Tuesday, April 14, 2020 9:33 AM
> To: devel@edk2.groups.io
> Cc: kuqin <kuqin@microsoft.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>; Sean Brogan <sean.brogan@micro= soft.com>;
> Bret Barkelew <Bret.Barkelew@microsoft.com>
> Subject: [edk2-devel] [PATCH v2] UnitTestFrameworkPkg/UnitTestLib: > Correct dereferred pointer
>
> From: kuqin <kuqin@microsoft.com>
>
> REF: https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fbugzil= la.tianocore.org%2Fshow_bug.cgi%3Fid%3D2609&amp;data=3D02%7C01%7CBret.B= arkelew%40microsoft.com%7C42a07ae2da8047642dbe08d7e4e3a195%7C72f988bf86f141= af91ab2d7cd011db47%7C1%7C0%7C637229538634306948&amp;sdata=3DLnkRj186gkk= T52eyVRrC6WeabUpQK4fqGfJ8zRGJpH8%3D&amp;reserved=3D0
>
> SavedState is not sticky, copied pointer update will not change sourc= e
> pointer
>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Sean Brogan <sean.brogan@microsoft.com>
> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
> Signed-off-by: Guomin Jiang <guomin.jiang@intel.com>
> ---
>  UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c | 4 += ;---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c > b/UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c
> index b136992d99..ba4b18568d 100644
> --- a/UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c
> +++ b/UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLi= b.c
> @@ -209,7 +209,6 @@ InitUnitTestFramework (
>    EFI_STATUS       = ;           Status; =   UNIT_TEST_FRAMEWORK_HANDLE
> NewFrameworkHandle;   UNIT_TEST_FRAMEWORK   =       *NewFramework;-
> UNIT_TEST_SAVE_HEADER       *SavedState= ;    Status       =3D EFI_SUCC= ESS;
> NewFramework =3D NULL;@@ -264,8 +263,7 @@ InitUnitTestFramework (=
>    // If there is a persisted context, load it now.&nb= sp;  //   if (DoesCacheExist
> (NewFrameworkHandle)) {-    SavedState =3D (UNIT_TEST_= SAVE_HEADER
> *)NewFramework->SavedState;-    Status =3D LoadUnit= TestCache
> (NewFrameworkHandle, &SavedState);+    Status = = =3D LoadUnitTestCache
> (NewFrameworkHandle,  (UNIT_TEST_SAVE_HEADER**)(&NewFramewor= k-
> >SavedState));     if (EFI_ERROR (Status)) {&n= bsp;      //       /= / Don't actually report it
> as an error, but emit a warning.--
> 2.25.1.windows.1
>
>
> -=3D-=3D-=3D-=3D-=3D-=3D
> Groups.io Links: You receive all messages sent to this group.
>
> View/Reply Online (#57288): https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fedk2.g= roups.io%2Fg%2Fdevel%2Fmessage%2F57288&amp;data=3D02%7C01%7CBret.Barkel= ew%40microsoft.com%7C42a07ae2da8047642dbe08d7e4e3a195%7C72f988bf86f141af91a= b2d7cd011db47%7C1%7C0%7C637229538634316946&amp;sdata=3DPEomgQB9WlQXGut1= oqdWdNt%2BbBNTAGv3HHRcv8eo8QM%3D&amp;reserved=3D0
> Mute This Topic: https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgroups= .io%2Fmt%2F73002073%2F4399222&amp;data=3D02%7C01%7CBret.Barkelew%40micr= osoft.com%7C42a07ae2da8047642dbe08d7e4e3a195%7C72f988bf86f141af91ab2d7cd011= db47%7C1%7C0%7C637229538634316946&amp;sdata=3DvtcVI4gP7UjLhQMuAc1JO%2B3= yRrWAysPB7tuqsZLmj6s%3D&amp;reserved=3D0
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fedk2.g= roups.io%2Fg%2Fdevel%2Funsub&amp;data=3D02%7C01%7CBret.Barkelew%40micro= soft.com%7C42a07ae2da8047642dbe08d7e4e3a195%7C72f988bf86f141af91ab2d7cd011d= b47%7C1%7C0%7C637229538634316946&amp;sdata=3DsnyZZwLcC1sDGE6ov2uGT8MPM%= 2FHsBi0yKP0z5FpFMIU%3D&amp;reserved=3D0
> [guomin.jiang@intel.com] -=3D-=3D-=3D-=3D-=3D-=3D




--_000_CY4PR21MB07436AC506EA966A863488AAEFD40CY4PR21MB0743namp_--