All of lore.kernel.org
 help / color / mirror / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, stolee@gmail.com, peff@peff.net
Subject: [PATCH 0/3] commit-graph: harden against various corruptions
Date: Thu, 5 Sep 2019 18:04:51 -0400	[thread overview]
Message-ID: <cover.1567720960.git.me@ttaylorr.com> (raw)

Hi,

This patch series is a polished version of a series I posed in [1],
based on the subsequent discussion starting in [2]. It hardens the 'git
commit-graph write' code to handle two new types of object corruption
that previously resulted in a SIGSEGV, which are:

  - a commit which lists a parent that does not exist, or is corrupt

  - a commit which lists a corrupt tree, or omits the 'tree ' line
    entirely.

The series goes as follows: first, we introduce failing tests that
demonstrate the above two cases, then subsequent commits to fix each of
them in turn.

When reviewing this series, it is worth keeping in mind that this is
really only applying a band-aid to get around a quirk of the object
parsing code, which is graciously described by Peff in more detail in
[3].

Thanks in advance for your review. I'll deploy this in the meantime to
GitHub's fork and report back on the success in the next "What's
Cooking".

Thanks,
Taylor

[1]: https://public-inbox.org/git/34e4ec793cb0d321d16b88777cd2db64ed7b772e.1567563244.git.me@ttaylorr.com/
[2]: https://public-inbox.org/git/20190904030456.GA28836@sigill.intra.peff.net/
[3]: https://public-inbox.org/git/20190905064723.GC21450@sigill.intra.peff.net/

Taylor Blau (3):
  t/t5318: introduce failing 'git commit-graph write' tests
  commit-graph.c: handle commit parsing errors
  commit-graph.c: handle corrupt/missing trees

 commit-graph.c          | 11 +++++++++--
 commit.c                |  3 ++-
 t/t5318-commit-graph.sh | 43 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 54 insertions(+), 3 deletions(-)

--
2.23.0

             reply	other threads:[~2019-09-05 22:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-05 22:04 Taylor Blau [this message]
2019-09-05 22:04 ` [PATCH 1/3] t/t5318: introduce failing 'git commit-graph write' tests Taylor Blau
2019-09-06 16:48   ` Derrick Stolee
2019-09-05 22:04 ` [PATCH 2/3] commit-graph.c: handle commit parsing errors Taylor Blau
2019-09-05 22:04 ` [PATCH 3/3] commit-graph.c: handle corrupt/missing trees Taylor Blau
2019-09-06  6:19   ` Jeff King
2019-09-06 15:42     ` Taylor Blau
2019-09-06 17:34       ` Jeff King
2019-09-06 16:51     ` Derrick Stolee
2019-09-06 17:37       ` Jeff King
2019-09-06 16:57     ` Junio C Hamano
2019-09-06 17:11       ` Junio C Hamano
2019-09-06 17:30         ` Jeff King
2019-09-06 17:28       ` Jeff King
2019-09-09 17:55         ` Junio C Hamano

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=cover.1567720960.git.me@ttaylorr.com \
    --to=me@ttaylorr.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=stolee@gmail.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.