public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Jon Turney <jon.turney@dronecode.org.uk>
To: The Cygwin Mailing List <cygwin@cygwin.com>
Subject: Re: setup 2.920 release candidate - please test
Date: Sun, 14 Aug 2022 20:00:58 +0100	[thread overview]
Message-ID: <d6be6754-4fad-cd5f-43f9-f4b660be86a0@dronecode.org.uk> (raw)
In-Reply-To: <874jyeydok.fsf@Rainer.invalid>

[-- Attachment #1: Type: text/plain, Size: 609 bytes --]

On 14/08/2022 17:47, Achim Gratz wrote:
> Christian Franke writes:
>> This version aborts if "Sync" setting is reverted to "Best".
> 
> If the abort goes away when building setup with the previous version of
> libsolv then you might have found an easier reproducer for a bug I'm
> chasing…  Running it in gdb should get you a SIGSEGV in
> solver_addduprules in this case.

After some staring at this crash and the code involved, I think the 
attached is the fix for this.

I think this crash would only occur if the solver was used with at least 
one package marked for distupgrade, then reused without any.

[-- Attachment #2: 0001-Ensure-duplinvolvedmap_all-is-reset-when-a-solver-is.patch --]
[-- Type: text/plain, Size: 864 bytes --]

From 480123038537b89bcfca4a8ac9b40271eb7f5d5b Mon Sep 17 00:00:00 2001
From: Jon Turney <jon.turney@dronecode.org.uk>
Date: Sun, 14 Aug 2022 18:45:20 +0100
Subject: [PATCH] Ensure duplinvolvedmap_all is reset when a solver is reused

Otherwise this can cause solver_addduprules() to be called even though
needduprules is 0, which will crash because solver_createdupmaps()
hasn't been called.
---
 src/solver.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/solver.c b/src/solver.c
index 28341d6d..e3779e23 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;
-- 
2.37.2


  reply	other threads:[~2022-08-14 19:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-02 14:37 Jon Turney
2022-08-14 12:38 ` Christian Franke
2022-08-14 16:47   ` Achim Gratz
2022-08-14 19:00     ` Jon Turney [this message]
2022-08-15  8:18     ` Christian Franke
2022-08-14 18:56   ` Jon Turney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d6be6754-4fad-cd5f-43f9-f4b660be86a0@dronecode.org.uk \
    --to=jon.turney@dronecode.org.uk \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).