git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Chris Torek <chris.torek@gmail.com>
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>,
	Git List <git@vger.kernel.org>
Subject: Re: [PATCH] diff: check for merge bases before assigning sym->base
Date: Thu, 9 Jul 2020 19:02:51 -0400	[thread overview]
Message-ID: <20200709230251.GC664420@coredump.intra.peff.net> (raw)
In-Reply-To: <CAPx1GvfLpTR-weVQcWm5iX59cmCh2Gad+vU=ESqqLkCq-O5RmA@mail.gmail.com>

On Wed, Jul 08, 2020 at 10:05:44AM -0700, Chris Torek wrote:

> > I don't see anything within this function guaranteeing that rpos is set,
> > either, though I suspect it is OK due to how the revision parser works.
> 
> Yes, I am depending on the revision parser to balance the left and
> right items.  I thought about having a BUG check but it seemed
> unnecessary.  On the other hand, I'm avoiding depending on its
> *placement* of left and right items.  Being more defensive might
> be good here.

I could go either way with adding a BUG (and it definitely doesn't need
to hold up this fix). I strongly suspect that getting a LEFT without a
RIGHT would be a bug in the rev parser, not this code. But seeing a
BUG() here might be a more friendly way of being informed of that than a
segfault. :)

-Peff

      reply	other threads:[~2020-07-09 23:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-07 23:54 t4068 test failure with -fsanitize=address brian m. carlson
2020-07-08  4:38 ` [PATCH] diff: check for merge bases before assigning sym->base Jeff King
2020-07-08 17:05   ` Chris Torek
2020-07-09 23:02     ` Jeff King [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20200709230251.GC664420@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=chris.torek@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sandals@crustytoothpaste.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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).