From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nguyen Thai Ngoc Duy Subject: Re: "git am" crash (builtin/apply.c:2108) + small repro Date: Wed, 3 Oct 2012 18:27:07 +0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: git@vger.kernel.org To: Alexey Spiridonov X-From: git-owner@vger.kernel.org Wed Oct 03 13:28:15 2012 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TJN7G-00049H-Eg for gcvg-git-2@plane.gmane.org; Wed, 03 Oct 2012 13:27:50 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753850Ab2JCL1k (ORCPT ); Wed, 3 Oct 2012 07:27:40 -0400 Received: from mail-qa0-f53.google.com ([209.85.216.53]:42980 "EHLO mail-qa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753542Ab2JCL1j (ORCPT ); Wed, 3 Oct 2012 07:27:39 -0400 Received: by qaas11 with SMTP id s11so1360919qaa.19 for ; Wed, 03 Oct 2012 04:27:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=30tt9JG4XTFYcFY6tVnZz3ZMyW1x7vWWm9EpPqfEzn0=; b=D91vQrS//kzw28x87+Keno1XhCOXFIYyBk/FGVcTx8uaFp5d3mwaZ8KEZcuCm/bp2E i1l5tKws8LmD8fExkuGfO54JpxJQPDikmWFXO8jo03kJ4+OIF5xbjQkhcGNAz4reMbSI FvBREIGryXpCU4FB8TKZ6Z4eJ68G6UisUc2H++hPpu/ZvBQg46w7Vgs7Elj3pa7ZeSaE /lhdICk+A4tTrEo4PkIuCprJbINdooakZaD783AZc04N/gPfUmoVlGKQoZ+qib0zi+dz jYekxafX696zIoLOdD0FvQ4ZwNhMquRKbMk6trSBJM506Ptd3RrKPSmb4R3/Rga3CHVY Aang== Received: by 10.224.78.70 with SMTP id j6mr6734549qak.21.1349263658792; Wed, 03 Oct 2012 04:27:38 -0700 (PDT) Received: by 10.49.72.201 with HTTP; Wed, 3 Oct 2012 04:27:07 -0700 (PDT) In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Tue, Oct 2, 2012 at 1:33 AM, Alexey Spiridonov 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