From 5304a229606e0b7d2bad7d9f3724f783cf4be578 Mon Sep 17 00:00:00 2001 From: han_hui_hui Date: Mon, 24 Oct 2022 02:04:39 +0000 Subject: [PATCH] ensure duplinvolvedmap_all is reset --- ensure-duplinvolvedmap_all-is-reset.patch | 30 +++++++++++++++++++++++ libsolv.spec | 9 ++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 ensure-duplinvolvedmap_all-is-reset.patch diff --git a/ensure-duplinvolvedmap_all-is-reset.patch b/ensure-duplinvolvedmap_all-is-reset.patch new file mode 100644 index 0000000..68b1838 --- /dev/null +++ b/ensure-duplinvolvedmap_all-is-reset.patch @@ -0,0 +1,30 @@ +From dd6e977782816e330a8f60cf78ca3d12fead3b10 Mon Sep 17 00:00:00 2001 +From: Jon Turney +Date: Sun, 14 Aug 2022 18:45:20 +0100 +Subject: [PATCH] Ensure duplinvolvedmap_all is reset when a solver is reused + +Otherwise, if solver is used with a SOLVER_DISTUPGRADE job, then reused +without one, this will cause solver_addduprules() to be called, even +though needduprules is 0, which will crash trying to dereference +solv->dupmap, which is NULL because solver_createdupmaps() hasn't been +called. + +Conflict:NA +Reference:https://github.com/openSUSE/libsolv/commit/dd6e977782816e330a8f60cf78ca3d12fead3b10 + +--- + src/solver.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/solver.c b/src/solver.c +index 28341d6d3..e3779e232 100644 +--- a/src/solver.c ++++ b/src/solver.c +@@ -3533,6 +3533,7 @@ solver_solve(Solver *solv, Queue *job) + map_zerosize(&solv->bestupdatemap); + solv->fixmap_all = 0; + map_zerosize(&solv->fixmap); ++ solv->dupinvolvedmap_all = 0; + map_zerosize(&solv->dupmap); + map_zerosize(&solv->dupinvolvedmap); + solv->process_orphans = 0; diff --git a/libsolv.spec b/libsolv.spec index 98379e7..29d82dd 100644 --- a/libsolv.spec +++ b/libsolv.spec @@ -15,7 +15,7 @@ Name: libsolv Version: 0.7.20 -Release: 2 +Release: 3 Summary: Package dependency solver License: BSD URL: https://github.com/openSUSE/libsolv @@ -23,6 +23,7 @@ Source: https://github.com/openSUSE/libsolv/archive/refs/tags/%{v Patch0: Fix-segfault-on-conflict-resolution-when-using-bindi.patch Patch1: Fix-memory-leak-when-using-testsolv-to-execute-cases.patch +Patch2: ensure-duplinvolvedmap_all-is-reset.patch BuildRequires: cmake gcc-c++ ninja-build pkgconfig(rpm) zlib-devel BuildRequires: libxml2-devel xz-devel bzip2-devel @@ -216,6 +217,12 @@ Python 3 version. %{_mandir}/man3/%{name}*.3* %changelog +* Fri Oct 21 2022 hanhuihui - 0.7.20-3 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:ensure-duplinvolvedmap_all-is-reset.patch + * Tue Oct 11 2022 zhangjun - 0.7.20-2 - Type:bugfix - ID:NA -- Gitee