From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web12.6285.1586323758289420516 for ; Tue, 07 Apr 2020 22:29:18 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=nMqWH5UK; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: guomin.jiang@intel.com) IronPort-SDR: iBEk9jBYYL47ZzjnCxe/9AWPLksE2psYAJizEQvvtEsIdRcSa2W804JhmL3OfPIII+pveohND9 xQ14K9yhxD+w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2020 22:29:17 -0700 IronPort-SDR: vCPw4nzDC1QP76BNuueBk0DuS16r8FKhkyAd5IuNr/a/WHwav8ciIBAshVjz9R4CXzgVH/ltwP /pegkZx4Fw6Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,357,1580803200"; d="scan'208";a="254691137" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga006.jf.intel.com with ESMTP; 07 Apr 2020 22:29:17 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 7 Apr 2020 22:29:08 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 7 Apr 2020 22:29:08 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 7 Apr 2020 22:29:08 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.174) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 7 Apr 2020 22:29:07 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iuU88ytN/fHSjNQ36m1kW7gtWNsbNRm8Gh+4j+SjESTbRgWz5X6e5ryZrIg5nXnAjllWOdwVD/r04Ry7wpkxcRe2MCLjouiUWJoyPDNOQ/G1ShhnrfaTdh4GHNYi+2X6D4syAHccZdoHok5VCGczkfPSOhLaW0hqn3W20qMyxCof00jEqOlsogePAhkFwTOIItoTxEkylkky0vIwhJFfv1RsVAZszcefTFi3bTgpHgGbiZTUZ5Q6pXv+H4dvSLfDNJW+6IJ5ztZt1Xn+zkSeb/pOs2KWfR4XHrjUzQ1SfKKpPpp2ulBNvLcufIBYg5e7ac9OGdzFDRdgfJbFWsxSyQ== 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=89ABVcyVW4KO6mTKF83KO7i72/aS59C7thEs2dFr6fU=; b=O5EutsrDnOmdyqYD4+3fUM0kE5VQ2rxhjzQL3tLH5SD83Pf79Db8J4fZnGILUNIcTGE8qtwPRN4e3Stm21hiFMZVj/sZFyAuDb8IQmIWEMF7P/Ik7Dqrc8eDzLZcWp1UwjF/VW+bPYW6khEEJzZiHE/yTr4vC4+zKWZ+jqgIM/ijoJXrOtn+UyXHqxrD5WsF0U51+hmOwQ9h56terXBfaa56kEreAMZbS90M1uE1YS0qxyEAqNL8oJHCRrBgpw0BgiRlpsREQsKTI5Xlnp7m4vKfZm++ssWzM1ws/Eaoz9Voh917hT69Vx1ThkOtAahS3h8tTCPoJ5YVAGAsx31NNw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=89ABVcyVW4KO6mTKF83KO7i72/aS59C7thEs2dFr6fU=; b=nMqWH5UKTILQrsORiHx/zQ9U3PHQpu3gz2JHk9/sGO4RsBJfqMMfe6zcpdzxoUOtf7Hd8Rm+oM/VBYiZUbqUl4GNuM7MaRWhASYOtb/Q9hINJDs5Wq1Qn73/Rp4Bi3kQJASpW7mkDYvCopvZOQbDubTU9+hZLrH5ilNq5CVOgks= Received: from DM6PR11MB2955.namprd11.prod.outlook.com (2603:10b6:5:65::31) by DM6PR11MB2729.namprd11.prod.outlook.com (2603:10b6:5:ce::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.19; Wed, 8 Apr 2020 05:29:04 +0000 Received: from DM6PR11MB2955.namprd11.prod.outlook.com ([fe80::f1ec:734d:b127:4519]) by DM6PR11MB2955.namprd11.prod.outlook.com ([fe80::f1ec:734d:b127:4519%3]) with mapi id 15.20.2878.022; Wed, 8 Apr 2020 05:29:04 +0000 From: "Guomin Jiang" To: "devel@edk2.groups.io" , "Jiang, Guomin" CC: "Kinney, Michael D" , Sean Brogan , Bret Barkelew Subject: Re: [edk2-devel] [PATCH] UnitTestFrameworkPkg/UnitTestLib: Correct dereferred pointer. Thread-Topic: [edk2-devel] [PATCH] UnitTestFrameworkPkg/UnitTestLib: Correct dereferred pointer. Thread-Index: AQHWByiTV6xspvsPckqFlR57CJdlz6huvrHQ Date: Wed, 8 Apr 2020 05:29:04 +0000 Message-ID: References: <160150CCACE2328E.16021@groups.io> In-Reply-To: <160150CCACE2328E.16021@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: spf=none (sender IP is ) smtp.mailfrom=guomin.jiang@intel.com; x-originating-ip: [192.55.52.200] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5f3b6c5b-aa73-4331-6cbf-08d7db7dc05e x-ms-traffictypediagnostic: DM6PR11MB2729: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4502; x-forefront-prvs: 0367A50BB1 x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB2955.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(10019020)(396003)(39860400002)(366004)(136003)(376002)(346002)(110136005)(66556008)(52536014)(5660300002)(66446008)(33656002)(76116006)(966005)(66476007)(316002)(478600001)(64756008)(86362001)(26005)(7696005)(55016002)(2906002)(66946007)(8676002)(9686003)(186003)(81156014)(71200400001)(54906003)(53546011)(8936002)(4326008)(81166007)(6506007);DIR:OUT;SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: HnU0Xz5bvbo8FYpCkYahEslwsFsn+/1b3nxHU03V9SDADUydnMskzDWFOuwd7/A+fAvRvKWEBGWBfiqK+iS2KHbEVAqFgyPF1IF+L0xnliAdVrM0TMP/ZEeONiywncKNRezhzu/UpynV/3iP4Svblb9+MrunLLs5npdEK5br4BwsMAw97eDYwU0dHO+bYB2UkR9XqEbRzphsRx13V+FG8O5nIpr3bzF5QY0d4hMsu5CEQVbrJibFoDjlrmMvoDmxNS9y2agiipc+WvDzKPDN5W/sMZOleKgEuB732DKm4r51xn5osG4ruwO6fwtoWSUh4fOLwNvCUcI3uVFwnFuc6SYrJJ0YYmROaDxOa9zbdCSykeF9y5ODX8nMJl0LWp1bLUIZBnL404qd4aGIoUw+P8l0Mt0r0TM5y1rz2sVMBjBEnobZu+2pxz0jdoBJWOrc2Wbh/BGarT26xE5VmCaTqhdN2bKVdMlLWOcurJWhdwtG3jiSfg9hboN51cDX+kmLlMnpPV0GEFB2auXN6mgLFg== x-ms-exchange-antispam-messagedata: y3RXivff5oF7OL3nL7F5UIgTFMubbjpIo7/oJ1u1aQXwnrEltKCS1iT9hqJpgbqIZ3Scuxp1gq7hB0tXReXTzzrnYRx1RDy/tZKXDAh+IHqZO/N+flSdfSKOomHCmPFSQ11vrCXKhwagiKXpJ22w4Q== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 5f3b6c5b-aa73-4331-6cbf-08d7db7dc05e X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Apr 2020 05:29:04.0553 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: QfnCeoxbepLVC0ED61h6n2KZc/cL53gBpMG/U/poxcfMjudTRbPA8duvGTnCefSykyLysJ+Uj0NfmxtgwJX20g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB2729 Return-Path: guomin.jiang@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Kinney, Sean, Bret, Could you help review the change. Best Regards guomin > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Guomin > Jiang > Sent: Tuesday, March 31, 2020 2:50 PM > To: devel@edk2.groups.io > Cc: Kinney, Michael D ; Sean Brogan > ; Bret Barkelew > > Subject: [edk2-devel] [PATCH] UnitTestFrameworkPkg/UnitTestLib: Correct > dereferred pointer. >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2609 >=20 > The copied pointer (SavedState) will be updated by LoadUnitTestCache > call. But the change of SavedState will not update source pointer, which > is NewFramework->SavedState in this case. >=20 > Cc: Michael D Kinney > Cc: Sean Brogan > Cc: Bret Barkelew > Signed-off-by: Guomin Jiang > --- > UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c > b/UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c > index b136992d99..71050b5618 100644 > --- a/UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c > +++ b/UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c > @@ -209,7 +209,7 @@ InitUnitTestFramework ( > EFI_STATUS Status; >=20 > UNIT_TEST_FRAMEWORK_HANDLE NewFrameworkHandle; >=20 > UNIT_TEST_FRAMEWORK *NewFramework; >=20 > - UNIT_TEST_SAVE_HEADER *SavedState; >=20 > + UNIT_TEST_SAVE_HEADER **SavedState; >=20 >=20 >=20 > Status =3D EFI_SUCCESS; >=20 > NewFramework =3D NULL; >=20 > @@ -264,8 +264,8 @@ InitUnitTestFramework ( > // If there is a persisted context, load it now. >=20 > // >=20 > if (DoesCacheExist (NewFrameworkHandle)) { >=20 > - SavedState =3D (UNIT_TEST_SAVE_HEADER *)NewFramework->SavedState; >=20 > - Status =3D LoadUnitTestCache (NewFrameworkHandle, &SavedState); >=20 > + SavedState =3D (UNIT_TEST_SAVE_HEADER **)(&NewFramework- > >SavedState); >=20 > + Status =3D LoadUnitTestCache (NewFrameworkHandle, SavedState); >=20 > if (EFI_ERROR (Status)) { >=20 > // >=20 > // Don't actually report it as an error, but emit a warning. >=20 > -- > 2.25.1.windows.1 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. >=20 > View/Reply Online (#56724): https://edk2.groups.io/g/devel/message/56724 > Mute This Topic: https://groups.io/mt/72671870/4399222 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub > [guomin.jiang@intel.com] > -=3D-=3D-=3D-=3D-=3D-=3D