Fix uninitialized variable in testsuite

This commit is contained in:
Jeff Law 2020-08-19 10:37:44 -06:00
parent 7ad897efa8
commit 506d1489d6
2 changed files with 28 additions and 1 deletions

22
libipt-gcc11.patch Normal file
View File

@ -0,0 +1,22 @@
diff --git a/libipt/test/src/ptunit-msec_cache.c b/libipt/test/src/ptunit-msec_cache.c
index 68d9daf..cfb059b 100644
--- a/libipt/test/src/ptunit-msec_cache.c
+++ b/libipt/test/src/ptunit-msec_cache.c
@@ -296,7 +296,7 @@ static struct ptunit_result read(struct test_fixture *tfix)
static struct ptunit_result fill_nomap(struct test_fixture *tfix)
{
const struct pt_mapped_section *msec;
- struct pt_asid asid;
+ struct pt_asid asid = { 0 };
struct pt_section *section;
int status;
@@ -320,7 +320,7 @@ static struct ptunit_result fill(struct test_fixture *tfix)
{
const struct pt_mapped_section *msec;
struct pt_section *section;
- struct pt_asid asid;
+ struct pt_asid asid = { 0 };
int status;
status = pt_msec_cache_fill(&tfix->mcache, &msec, &tfix->image, &asid,

View File

@ -2,11 +2,12 @@
Name: libipt
Version: 2.0.2
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Intel Processor Trace Decoder Library
License: BSD
URL: https://github.com/intel/libipt
Source0: https://github.com/intel/libipt/archive/v%{version}.tar.gz
Patch0: libipt-gcc11.patch
# c++ is required only for -DPTUNIT test "ptunit-cpp".
# pandoc is for -DMAN.
BuildRequires: gcc-c++ cmake pandoc
@ -30,6 +31,7 @@ develop programs that use the Intel Processor Trace (Intel PT) Decoder Library.
%prep
%setup -q -n libipt-%{version}
%patch0 -p1
%build
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
@ -59,6 +61,9 @@ ctest -V %{?_smp_mflags}
%{_mandir}/*/*.gz
%changelog
* Wed Aug 19 2020 Jeff Law <law@redhat.com> - 2.0.2-2
- Fix uninitialized variable in testsuite
* Tue Aug 04 2020 Keith Seitz <keiths@redhat.com> - 2.0.2-1
- Upgrade to 2.0.2.