All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marcel Röthke" <marcel@roethke.info>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2] rerere: fix crash during clear
Date: Sat, 24 Feb 2024 12:25:04 +0100	[thread overview]
Message-ID: <ZdnSEFgLdev3L2qs@roethke.info> (raw)
In-Reply-To: <xmqqplwsx730.fsf@gitster.g>

On 2024-02-19 17:22:43, Junio C Hamano wrote:
> Marcel Röthke <marcel@roethke.info> writes:
>
> > When rerere_clear is called, for instance when aborting a rebase, and
> > the current conflict does not have a pre or postimage recorded git
> > crashes with a SEGFAULT in has_rerere_resolution when accessing the
> > status member of struct rerere_dir.
>
> I had to read this twice before realizing the reason why I found it
> hard to grok was because of a missing comma between "recorded" and
> "git".

fixed

> > This happens because scan_rerere_dir
> > only allocates the status field in struct rerere_dir when a post or
> > preimage was found.
>
> But that is not really the root cause, no?  Readers following the
> above text are probably wondering why the preimage was not recorded,
> when a conflict resulted in stopping a mergy-command and invoking
> rerere machinery, before rerere_clear() got called.  Is that
> something that usually happen?  How?  Do we have a reproduction
> sequence of such a state that we can make it into a new test in
> t4200 where we already have tests for "git rerere clear" and its
> friends?

I'm unfortunately not sure how it happened. I do have the initial state
of the repository and I think I know the commands that were executed,
but I could not reproduce it.

I will look into adding a test case though.

  reply	other threads:[~2024-02-24 11:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-18 11:49 [PATCH] rerere: fix crash in during clear Marcel Röthke
2024-02-18 13:02 ` Kristoffer Haugsbakk
2024-02-18 19:38   ` Marcel Röthke
2024-02-18 19:46 ` [PATCH v2] rerere: fix crash " Marcel Röthke
2024-02-20  1:22   ` Junio C Hamano
2024-02-24 11:25     ` Marcel Röthke [this message]
2024-03-24 21:51       ` Junio C Hamano
2024-03-25 19:30         ` Marcel Röthke
2024-04-07 20:12         ` Marcel Röthke
2024-04-08 15:18           ` Junio C Hamano
2024-04-09 12:13   ` [PATCH v3] rerere: fix crashes due to unmatched opening conflict markers Marcel Röthke
2024-04-12 23:37     ` Junio C Hamano
2024-04-15 20:15     ` Junio C Hamano
2024-04-16 10:50       ` Marcel Röthke
2024-04-16 10:52     ` [PATCH v4] " Marcel Röthke

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=ZdnSEFgLdev3L2qs@roethke.info \
    --to=marcel@roethke.info \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.