git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
To: Alexey Spiridonov <snarkmaster@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: "git am" crash (builtin/apply.c:2108) + small repro
Date: Wed, 3 Oct 2012 18:27:07 +0700	[thread overview]
Message-ID: <CACsJy8B9NDmGnopoFEAA0T4mgG+54npYnbb_d4tihRNB=xrGnw@mail.gmail.com> (raw)
In-Reply-To: <CAOKKMFG4JsNyMY7=SB6EuR8_GnpAu-ysH02J5pwD1cNzUgaieQ@mail.gmail.com>

On Tue, Oct 2, 2012 at 1:33 AM, Alexey Spiridonov <snarkmaster@gmail.com> wrote:
> This reproduces in trunk, 1.7.8.4, and 1.7.9.5.

fwiw, I cannot reproduce it (git-apply does not crash). I tried both
versions and 1.8.0-rc1. Just in case the attached files are somehow
corrupted, this is sha1sum from my side:

3d4711cd15d9617e0d3a52bbcd7def898c12c328  crashy.patch
fd63cc32338823f216a6684ce5118a69113968c8  meep/spork/__init__.py

> I suspect this has to do with a whitespace + no trailing newline
> issues. The patch was generated by 1.7.9.5. I mangled it by hand to
> get it to be small, but the initial crash happened on a large,
> real-world output of "git format-patch".
>
> Error messages:
>
> ~/GIT-AM-CRASH$ ../git/git am crashy.patch
> Applying: Git crash bug
> git: builtin/apply.c:2108: update_pre_post_images: Assertion
> `fixed_preimage.nr == preimage->nr' failed.
> /home/lesha/GIT-AM-CRASH/../git/git-am: line 811: 23819 Aborted
>          git apply --index "$dotest/patch"
> Patch failed at 0001 Git crash bug
> The copy of the patch that failed is found in:
>    /home/lesha/GIT-AM-CRASH/.git/rebase-apply/patch
> When you have resolved this problem, run "git am --resolved".
> If you prefer to skip this patch, run "git am --skip" instead.
> To restore the original branch and stop patching, run "git am --abort".
>
> Repro steps:
>
> mkdir GIT-AM-CRASH
> cd GIT-AM-CRASH
> # download files into this directory
> git init .
> mkdir -p meep/spork
> mv __init__.py meep/spork
> git add meep/spork/__init__.py
> git ci -am 'moo'
> git am crashy.patch
>
> Hope this helps!
>
> Alexey
-- 
Duy

  reply	other threads:[~2012-10-03 11:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-01 18:33 "git am" crash (builtin/apply.c:2108) + small repro Alexey Spiridonov
2012-10-03 11:27 ` Nguyen Thai Ngoc Duy [this message]
2012-10-03 15:44   ` Alexey Spiridonov
2012-10-07  3:33     ` Nguyen Thai Ngoc Duy
2012-10-12 21:35       ` Junio C Hamano
     [not found]         ` <7vlifb2tfp.fsf@alter.siamese.dyndns.org>
2012-11-05 22:55           ` Alexey Spiridonov
2012-11-14 22:50             ` 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

  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='CACsJy8B9NDmGnopoFEAA0T4mgG+54npYnbb_d4tihRNB=xrGnw@mail.gmail.com' \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=snarkmaster@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.
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).