git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Darrin Thompson <darrint@progeny.com>
Cc: git@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>
Subject: Delitifier broken (Re: diff-core segfault)
Date: Mon, 12 Dec 2005 10:59:24 -0800	[thread overview]
Message-ID: <7virtui1kj.fsf_-_@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <7vmzj6i206.fsf@assigned-by-dhcp.cox.net> (Junio C. Hamano's message of "Mon, 12 Dec 2005 10:50:01 -0800")

Junio C Hamano <junkio@cox.net> writes:

> Darrin Thompson <darrint@progeny.com> writes:
>
>> Could someone confirm that this exists on more recent git heads and fix
>> if needed?
>
> (1) Yup.  I can reproduce it.
> (2) Will look into it when able.

This is not just "diff".  Our deltify code is half-broken, and
in the worst case this can corrupt our packs if an empty blob is
involved.

The problem is if from_size or to_size is empty, it does not
produce any.

        if (!from_size || !to_size || delta_prepare(from_buf, from_size, &bdf))
                return NULL;
	

I think either we need to make the users more careful or fix
deltifier to produce trivial delta.  I'd vote for the latter;
let me rig up something.

  reply	other threads:[~2005-12-12 18:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-12 16:29 diff-core segfault Darrin Thompson
2005-12-12 16:56 ` Johannes Schindelin
2005-12-12 18:50 ` Junio C Hamano
2005-12-12 18:59   ` Junio C Hamano [this message]
2005-12-12 21:28     ` Delitifier broken (Re: diff-core segfault) Nicolas Pitre
2005-12-12 21:54       ` Junio C Hamano
2005-12-12 23:31         ` Linus Torvalds
2005-12-13  1:08           ` Junio C Hamano
2005-12-13  1:34             ` Linus Torvalds
2005-12-13  1:41               ` Junio C Hamano
2005-12-13  2:05               ` Linus Torvalds
2005-12-13  2:45                 ` Nicolas Pitre
2005-12-13  3:23                   ` Junio C Hamano
2005-12-12 20:40 ` [PATCH 2/2] diff-delta.c: allow delta with empty blob Junio C Hamano
2005-12-12 21:12   ` Darrin Thompson

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=7virtui1kj.fsf_-_@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=darrint@progeny.com \
    --cc=git@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /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).