From nobody Sun May 5 03:45:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+57288+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57288+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1586827979; cv=none; d=zohomail.com; s=zohoarc; b=iR5UPoGX1gOHjcuoxkZuFn09PSf+7ulieMGokkwrfwJLVJR7y78o/G873Ss51zlX3DpKJfGZZV+nxwR0128R6o55IVUM+QMBoDcAunXTp3wOPLWRfDtb23Xhmm8YuShbYvtWShCT0ybzaOeQmGL3TK7STez6EZAp8RX7ynj0LpA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586827979; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=CSCZDd/lQO9Pwd/nQAVrhyODOGAuA2sNuuWtwfxmEWQ=; b=SQ4CLNWiG0v3X1eW+tMfZ3rvA4B+mazbvr/s19IWbZQcn0sllVZO09GoTKbg9vqJJMZzyNdsKK4MJU3BoR1xDBGV5Q6qMOplMbfEKqxOaIGSCpyx3LIuOKaai/wwyzdZfArOsvM06qvfQWGJGKjfvaiQrJOybcp2dlBe1wDpJM8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57288+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1586827979634132.42039011103338; Mon, 13 Apr 2020 18:32:59 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id qh2JYY1788612xlCl0K7mAdi; Mon, 13 Apr 2020 18:32:59 -0700 X-Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web12.3536.1586827978107152642 for ; Mon, 13 Apr 2020 18:32:58 -0700 IronPort-SDR: wrjYjCkSNTdhNxw3xduG1qNO5d5OyQjb77SFEI4jZ9J3UXPBDBr+Gnn6JHkVpLJYpfd3WWeC49 2A0MVgz97PJA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2020 18:32:57 -0700 IronPort-SDR: VDOy7NFsCrVWaPtIbE/QQv383AgFpmMnsq1Vf6qw2fDYWUAK+PIri69FIbMXipjoHz0HXKVogM I/c7+w0pwj+g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,381,1580803200"; d="scan'208";a="426889957" X-Received: from unknown (HELO guominji-MOBL.ccr.corp.intel.com) ([10.239.158.171]) by orsmga005.jf.intel.com with ESMTP; 13 Apr 2020 18:32:55 -0700 From: "Guomin Jiang" To: devel@edk2.groups.io Cc: kuqin , Michael D Kinney , Sean Brogan , Bret Barkelew Subject: [edk2-devel] [PATCH v2] UnitTestFrameworkPkg/UnitTestLib: Correct dereferred pointer Date: Tue, 14 Apr 2020 09:32:54 +0800 Message-Id: <20200414013254.2245-1-guomin.jiang@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,guomin.jiang@intel.com X-Gm-Message-State: kjQx49MgASZ0iq1wkiXjMV5Yx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1586827979; bh=11uNPGyGr5vvCUMmL6x8yOWZ1NwduQzT2KIHINIPoco=; h=Cc:Date:From:Reply-To:Subject:To; b=lzWtNdOG9Z+iitC4/ZAvIOnDtdJvokH3AHinblBpEPn9hn1AIrCtg75LHNDLxwnKJ9+ zDt4fgib1IkfkBF0n/vsyMbzcvaxI5BZSk8wgXIxCBWaLdJD2T7S4d9im0y+Vu0kvTmnR al4Tu8M3t3BDhsr5a04ToXNx2XENlRH5FRA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: kuqin REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2609 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 Reviewed-by: Michael D Kinney --- UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c b/UnitT= estFrameworkPkg/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; =20 Status =3D EFI_SUCCESS; NewFramework =3D NULL; @@ -264,8 +263,7 @@ InitUnitTestFramework ( // If there is a persisted context, load it now. // if (DoesCacheExist (NewFrameworkHandle)) { - SavedState =3D (UNIT_TEST_SAVE_HEADER *)NewFramework->SavedState; - Status =3D LoadUnitTestCache (NewFrameworkHandle, &SavedState); + Status =3D LoadUnitTestCache (NewFrameworkHandle, (UNIT_TEST_SAVE_HEA= DER**)(&NewFramework->SavedState)); if (EFI_ERROR (Status)) { // // Don't actually report it as an error, but emit a warning. --=20 2.25.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#57288): https://edk2.groups.io/g/devel/message/57288 Mute This Topic: https://groups.io/mt/73002073/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-