All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Bernhard Posselt <mail@bernhard-posselt.com>, git@vger.kernel.org
Subject: Re: Memory corruption when rebasing with git version 1.8.1.5 on arch
Date: Tue, 19 Mar 2013 09:02:57 -0700	[thread overview]
Message-ID: <7vobefjs26.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20130319134452.GA6752@sigill.intra.peff.net> (Jeff King's message of "Tue, 19 Mar 2013 09:44:52 -0400")

Jeff King <peff@peff.net> writes:

> and so on. I haven't quite figured out what is going on. It looks like
> we call update_pre_post_images with postlen==0, which causes it to just
> write the fixed postimage into the existing buffer. But of course the
> fixed version is bigger, because we are expanding the tabs into 8
> spaces (but it _doesn't_ break if each line starts with only one tab,
> which confuses me).

I used to be intimately familiar with the update_pre_post_images()
function, but the version after 86c91f91794c (git apply: option to
ignore whitespace differences, 2009-08-04), I won't vouch for it
doing anything sensible.  We recently had to do 5de7166d46d2
(apply.c:update_pre_post_images(): the preimage can be truncated,
2012-10-12) to fix one of its corner cases but I would not be
surprised if there are other cases the function gets it all wrong.

I'd come back to the topic after I finish other tasks on my plate,
so if somebody is inclined please go ahead digging this a bit
further; I won't have much head start to begin with in this code
X-<.

  reply	other threads:[~2013-03-19 16:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-08 12:19 Memory corruption when rebasing with git version 1.8.1.5 on arch Bernhard Posselt
2013-03-08 21:28 ` Jeff King
2013-03-09  0:08   ` Bernhard Posselt
2013-03-09  4:48     ` Jeff King
2013-03-09 10:54       ` Bernhard Posselt
2013-03-10  7:05         ` Jeff King
2013-03-10 11:04           ` Bernhard Posselt
2013-03-10 11:45           ` Bernhard Posselt
2013-03-11  5:18             ` Jeff King
2013-03-19 10:42               ` Bernhard Posselt
2013-03-19 13:44                 ` Jeff King
2013-03-19 16:02                   ` Junio C Hamano [this message]
2013-03-22 18:08                     ` Junio C Hamano
2013-03-22 21:24                       ` Jeff King

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=7vobefjs26.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mail@bernhard-posselt.com \
    --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 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.