From: Junio C Hamano <gitster@pobox.com>
To: Emily Shaffer <emilyshaffer@google.com>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org
Subject: Re: [RFC PATCH] unpack-trees: watch for out-of-range index position
Date: Wed, 08 Jan 2020 12:35:29 -0800 [thread overview]
Message-ID: <xmqqo8vd1yb2.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20200108193833.GD181522@google.com> (Emily Shaffer's message of "Wed, 8 Jan 2020 11:38:33 -0800")
Emily Shaffer <emilyshaffer@google.com> writes:
>> > The new condition you added looks correct to me. I suspect this BUG()
>> > should not be a BUG() at all, though. It's not necessarily a logic error
>> > inside Git, but as you showed it could indicate corrupt data we read
>> > from disk. The true is probably same of the "pos >= 0" condition checked
>> > above.
>>
>> It does not sound like a BUG to me, either, but the new condition
>> does look correct to me, too. We can turn it into die() later if
>> somebody truly cares ;-)
>>
>> Thanks, both. Will queue.
>
> Thanks much for the quick turnaround. If I hear more noise I'll give it
> a try with die() or error code instead, but for now I'll move on to the
> next bug on my list. :)
By the way, it is somewhat sad that we proceeded that far in the
first place---such a corrupt on-disk index would have caused an
early die() if we did not get rid of the trailing-hash integrity
check.
next prev parent reply other threads:[~2020-01-08 20:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-08 2:31 [RFC PATCH] unpack-trees: watch for out-of-range index position Emily Shaffer
2020-01-08 7:15 ` Jeff King
2020-01-08 17:30 ` Junio C Hamano
2020-01-08 19:38 ` Emily Shaffer
2020-01-08 20:35 ` Junio C Hamano [this message]
2020-01-09 7:52 ` Jeff King
2020-01-09 22:46 ` Emily Shaffer
2020-01-10 6:37 ` Jeff King
2020-01-10 23:07 ` Emily Shaffer
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=xmqqo8vd1yb2.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=emilyshaffer@google.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.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.
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 NNTP newsgroup(s).