# git-apply segfault

2 messages from 2007-10-17 to 2007-10-17. Participants: Andy Parkins, Pierre Habouzit.
Thread: https://gitlist.dev/t/10341

## Andy Parkins, 2007-10-17 10:00

Subject: git-apply segfault
Message-ID: <200710171100.01247.andyparkins@gmail.com>
URL: https://gitlist.dev/e/200710171100.01247.andyparkins%40gmail.com

```
Hello,

I've not got time to investigate this further just now, I'll try later.  In 
case anyone else wants to though; I just got this core dump when running git 
rebase using current git master (1.5.3.4.206.g58ba4):

Core was generated by `git 
apply --allow-binary-replacement --index .dotest/patch'.
Program terminated with signal 11, Segmentation fault.
#0  0xb7cd42a0 in memchr () from /lib/i686/cmov/libc.so.6
(gdb) bt
#0  0xb7cd42a0 in memchr () from /lib/i686/cmov/libc.so.6
#1  0x080c0931 in convert_to_git (path=0x8129a88 "ui/dmswindow.cc", 
src=0xb7c3d008 <Address 0xb7c3d008 out of bounds>, len=88306, dst=0xbfb689bc)
    at convert.c:428
#2  0x0804ecfd in check_patch_list (patch=0x81299d0) at builtin-apply.c:1434
#3  0x080510fa in apply_patch (fd=1, filename=0xffffffff <Address 0xffffffff 
out of bounds>, inaccurate_eof=1) at builtin-apply.c:2686
#4  0x0805233e in cmd_apply (argc=4, argv=0xbfb69d18, unused_prefix=0x0) at 
builtin-apply.c:2853
#5  0x0804ab3b in handle_internal_command (argc=4, argv=0xbfb69d18) at 
git.c:284
#6  0x0804b19f in main (argc=2037149808, argv=0x612d2d00) at git.c:467

It was (unfortunately) on a private repository so I can't share it for 
testing, but am happy to do tests if wanted.



Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com

```

## Pierre Habouzit, 2007-10-17 11:10

Subject: Re: git-apply segfault
Message-ID: <20071017111035.GC4350@artemis.corp>
URL: https://gitlist.dev/e/20071017111035.GC4350%40artemis.corp
In-Reply-To: <200710171100.01247.andyparkins@gmail.com>

```
On Wed, Oct 17, 2007 at 10:00:01AM +0000, Andy Parkins wrote:
> Hello,
> 
> I've not got time to investigate this further just now, I'll try later.  In 
> case anyone else wants to though; I just got this core dump when running git 
> rebase using current git master (1.5.3.4.206.g58ba4):

  It's not the current master, it's an old one, the fix is in:
90d16ec032b20f9f1146f3aceca12165aba3b6d6

  You must fetch from spearce.git[0] that has taken maintainance interim
until junio comes back.

Cheers,

  [0] git://repo.or.cz/git/spearce.git
-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

```
