git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git merge-tree segfault
@ 2010-10-28 20:16 Klas Lindberg
  2010-10-28 20:25 ` Tim Mazid
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Klas Lindberg @ 2010-10-28 20:16 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 518 bytes --]

I haven't tried this on newer versions of git, but the release notes
for later releases don't mention merge-tree anywhere, so...

git version: 1.7.0
uname -a: Linux tor 2.6.32-trunk-amd64 #1 SMP Sun Jan 10 22:40:40 UTC
2010 x86_64 GNU/Linux
distro: Debian GNU/Linux squeeze/sid

Unpack the attached tree, cd into it and run:
git merge-tree common master other

I get the following result:
added in local
  our    100644 d68dd4031d2ad5b7a3829ad7df6635e27a7daa22 t1.txt
Segmentation fault

The exit code:
139

BR / Klas

[-- Attachment #2: merge-tree_segfault.tar.gz --]
[-- Type: application/x-gzip, Size: 7452 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: git merge-tree segfault
  2010-10-28 20:16 git merge-tree segfault Klas Lindberg
@ 2010-10-28 20:25 ` Tim Mazid
  2010-10-30 16:27   ` Klas Lindberg
  2010-10-30 17:25 ` Ævar Arnfjörð Bjarmason
  2010-10-30 17:26 ` Mathias Lafeldt
  2 siblings, 1 reply; 6+ messages in thread
From: Tim Mazid @ 2010-10-28 20:25 UTC (permalink / raw)
  To: klas.lindberg, Git Mailing List


> Date: Thu, 28 Oct 2010 22:16:03 +0200
> Subject: git merge-tree segfault
> From: klas.lindberg@gmail.com
> To: git@vger.kernel.org
>
> I haven't tried this on newer versions of git, but the release notes
> for later releases don't mention merge-tree anywhere, so...
>
> git version: 1.7.0
> uname -a: Linux tor 2.6.32-trunk-amd64 #1 SMP Sun Jan 10 22:40:40 UTC
> 2010 x86_64 GNU/Linux
> distro: Debian GNU/Linux squeeze/sid
>
> Unpack the attached tree, cd into it and run:
> git merge-tree common master other
>
> I get the following result:
> added in local
> our 100644 d68dd4031d2ad5b7a3829ad7df6635e27a7daa22 t1.txt
> Segmentation fault
>
> The exit code:
> 139
>
> BR / Klas


Confirm this bug with arbitrary repository and arbitrary revs.

git version: 1.7.1
uname -a: Linux Imperial-SSD-Overlord 2.6.35-trunk-amd64 #1 SMP
Tue Aug 17 08:22:25 UTC 2010 x86_64 GNU/Linux
distro: Debian GNU/Linux unstable/experimental

Same exit code; 139.

Regards,
Tim.

 		 	   		  

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: git merge-tree segfault
  2010-10-28 20:25 ` Tim Mazid
@ 2010-10-30 16:27   ` Klas Lindberg
  0 siblings, 0 replies; 6+ messages in thread
From: Klas Lindberg @ 2010-10-30 16:27 UTC (permalink / raw)
  To: Tim Mazid; +Cc: Git Mailing List

On Thu, Oct 28, 2010 at 10:25 PM, Tim Mazid <timmazid@hotmail.com> wrote:
>
>> Date: Thu, 28 Oct 2010 22:16:03 +0200
>> Subject: git merge-tree segfault
>> From: klas.lindberg@gmail.com
>> To: git@vger.kernel.org
>>
>> I haven't tried this on newer versions of git, but the release notes
>> for later releases don't mention merge-tree anywhere, so...
>>
>> git version: 1.7.0
>> uname -a: Linux tor 2.6.32-trunk-amd64 #1 SMP Sun Jan 10 22:40:40 UTC
>> 2010 x86_64 GNU/Linux
>> distro: Debian GNU/Linux squeeze/sid
>>
>> Unpack the attached tree, cd into it and run:
>> git merge-tree common master other
>>
>> I get the following result:
>> added in local
>> our 100644 d68dd4031d2ad5b7a3829ad7df6635e27a7daa22 t1.txt
>> Segmentation fault
>>
>> The exit code:
>> 139
>>
>> BR / Klas
>
>
> Confirm this bug with arbitrary repository and arbitrary revs.
>
> git version: 1.7.1
> uname -a: Linux Imperial-SSD-Overlord 2.6.35-trunk-amd64 #1 SMP
> Tue Aug 17 08:22:25 UTC 2010 x86_64 GNU/Linux
> distro: Debian GNU/Linux unstable/experimental
>
> Same exit code; 139.
>
> Regards,
> Tim.
>
>

I made some more tests and discovered that the order of parameters to
merge-tree is important:

 * Let the tree contain one commit.
 * Let the tree contain branches "common", "this" and "that". All of
them point to the single commit.

 * Check out "this" and add/commit a file "text". "text" does not
appear in "that".
 * Running "git merge-tree common this that" triggers the bug.
 * Running "git merge-tree common that this" does NOT trigger the bug.

BR / Klas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: git merge-tree segfault
  2010-10-28 20:16 git merge-tree segfault Klas Lindberg
  2010-10-28 20:25 ` Tim Mazid
@ 2010-10-30 17:25 ` Ævar Arnfjörð Bjarmason
  2010-10-30 17:26 ` Mathias Lafeldt
  2 siblings, 0 replies; 6+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-10-30 17:25 UTC (permalink / raw)
  To: Klas Lindberg; +Cc: git

On Thu, Oct 28, 2010 at 20:16, Klas Lindberg <klas.lindberg@gmail.com> wrote:
> I haven't tried this on newer versions of git, but the release notes
> for later releases don't mention merge-tree anywhere, so...

Doesn't segfault for me. Probably since my version has this commit:

commit 21baa6e0c56d229866c02c4b42b8b53af648d853
Author: Will Palmer <wmpalmer@gmail.com>
Date:   Wed Jul 14 18:04:07 2010 +0100

    merge-tree: fix where two branches share no changes

    15b4f7a (merge-tree: use ll_merge() not xdl_merge(), 2010-01-16)
    introduced a regression to merge-tree to cause it to segfault when merging
    files which existed in one branch, but not in the other or in the
    merge-base. This was caused by referencing entry->path at a time when
    entry was known to be possibly-NULL.

    To correct the problem, we save the path of the entry we came in with,
    as the path should be the same among all the stages no matter which
    sides are involved in the merge.

    Signed-off-by: Will Palmer <wmpalmer@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>

$ git tag --contains 21baa6e0c56d229866c02c4b42b8b53af648d853|grep ^v
v1.7.2
v1.7.2.1
v1.7.2.2
v1.7.2.3
v1.7.2.3.msysgit.0
v1.7.3
v1.7.3-rc0
v1.7.3-rc1
v1.7.3-rc2
v1.7.3.1
v1.7.3.1.msysgit.0
v1.7.3.2
v1.7.3.2.msysgit.0

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: git merge-tree segfault
  2010-10-28 20:16 git merge-tree segfault Klas Lindberg
  2010-10-28 20:25 ` Tim Mazid
  2010-10-30 17:25 ` Ævar Arnfjörð Bjarmason
@ 2010-10-30 17:26 ` Mathias Lafeldt
  2010-10-30 18:11   ` Klas Lindberg
  2 siblings, 1 reply; 6+ messages in thread
From: Mathias Lafeldt @ 2010-10-30 17:26 UTC (permalink / raw)
  To: Klas Lindberg; +Cc: git

On 10/28/2010 10:16 PM, Klas Lindberg wrote:
> I haven't tried this on newer versions of git, but the release notes
> for later releases don't mention merge-tree anywhere, so...
> 
> git version: 1.7.0
> uname -a: Linux tor 2.6.32-trunk-amd64 #1 SMP Sun Jan 10 22:40:40 UTC
> 2010 x86_64 GNU/Linux
> distro: Debian GNU/Linux squeeze/sid
> 
> Unpack the attached tree, cd into it and run:
> git merge-tree common master other
> 
> I get the following result:
> added in local
>   our    100644 d68dd4031d2ad5b7a3829ad7df6635e27a7daa22 t1.txt
> Segmentation fault
> 
> The exit code:
> 139
> 
> BR / Klas

Looks like this has been fixed by 21baa6e (merge-tree: fix where two
branches share no changes, 2010-07-14).

$ git merge-tree common master other
added in local
  our    100644 d68dd4031d2ad5b7a3829ad7df6635e27a7daa22 t1.txt

$ echo $?
0

$ git --version 
git version 1.7.3.2

-Mathias

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: git merge-tree segfault
  2010-10-30 17:26 ` Mathias Lafeldt
@ 2010-10-30 18:11   ` Klas Lindberg
  0 siblings, 0 replies; 6+ messages in thread
From: Klas Lindberg @ 2010-10-30 18:11 UTC (permalink / raw)
  To: Mathias Lafeldt; +Cc: git

Beautiful, and it's in Debian/squeeze too  :-)

Thanks for finding the fixed version. I was just about to make a
kludge in my porcelain to work around this.

BR / Klas

On Sat, Oct 30, 2010 at 7:26 PM, Mathias Lafeldt <misfire@debugon.org> wrote:
> On 10/28/2010 10:16 PM, Klas Lindberg wrote:
>> I haven't tried this on newer versions of git, but the release notes
>> for later releases don't mention merge-tree anywhere, so...
>>
>> git version: 1.7.0
>> uname -a: Linux tor 2.6.32-trunk-amd64 #1 SMP Sun Jan 10 22:40:40 UTC
>> 2010 x86_64 GNU/Linux
>> distro: Debian GNU/Linux squeeze/sid
>>
>> Unpack the attached tree, cd into it and run:
>> git merge-tree common master other
>>
>> I get the following result:
>> added in local
>>   our    100644 d68dd4031d2ad5b7a3829ad7df6635e27a7daa22 t1.txt
>> Segmentation fault
>>
>> The exit code:
>> 139
>>
>> BR / Klas
>
> Looks like this has been fixed by 21baa6e (merge-tree: fix where two
> branches share no changes, 2010-07-14).
>
> $ git merge-tree common master other
> added in local
>  our    100644 d68dd4031d2ad5b7a3829ad7df6635e27a7daa22 t1.txt
>
> $ echo $?
> 0
>
> $ git --version
> git version 1.7.3.2
>
> -Mathias
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-10-30 18:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-28 20:16 git merge-tree segfault Klas Lindberg
2010-10-28 20:25 ` Tim Mazid
2010-10-30 16:27   ` Klas Lindberg
2010-10-30 17:25 ` Ævar Arnfjörð Bjarmason
2010-10-30 17:26 ` Mathias Lafeldt
2010-10-30 18:11   ` Klas Lindberg

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 NNTP newsgroup(s).