git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
To: git@vger.kernel.org
Subject: >4GiB source delta assertion failure
Date: Thu, 22 Jul 2010 02:16:35 +0300	[thread overview]
Message-ID: <20100721231635.GA6387@LK-Perkele-V2.elisa-laajakaista.fi> (raw)

Yes, I know trying to delta-compress with 4GiB files is insane, but OTOH,
assertion failures are bugs by defintion.

Delta source: <4GiB of zeroes> <random 64KiB block>
Delta destination: <the same 64KiB block>

This was created using:
$ dd if=/dev/urandom of=test-delta-target bs=64k count=1
$ dd if=test-delta-target of=test-delta-source bs=64k seek=64k

Now running

$ ./test-delta -d test-delta-source test-delta-target test-delta-delta

Crashes with (v1.7.2):

test-delta: diff-delta.c:285: create_delta_index: Assertion `packed_entry - (struct index_entry *)mem == entries' failed.
Aborted


As note: The delta compression format does not allow delta compression to 
properly work in this case (since source offset would need to be 2^32 and
biggest possible offset is 2^32-1), and thus the size of output should be on
order of 66kB.

-Ilari

             reply	other threads:[~2010-07-21 23:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-21 23:16 Ilari Liusvaara [this message]
2010-08-21  5:00 ` [PATCH] fix >4GiB source delta assertion failure Nicolas Pitre

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=20100721231635.GA6387@LK-Perkele-V2.elisa-laajakaista.fi \
    --to=ilari.liusvaara@elisanet.fi \
    --cc=git@vger.kernel.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.
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).