{"thread":{"id":"25581","subject":"git merge-tree segfault","startedAt":"2010-10-28T20:16:03Z","lastAt":"2010-10-30T18:11:22Z","messageCount":6,"participants":["Klas Lindberg","Tim Mazid","Ævar Arnfjörð Bjarmason","Mathias Lafeldt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"154671","messageId":"AANLkTinJQCqwRZpbO66VHrgxezedS1Ay3nr9kayiODi9@mail.gmail.com","threadId":"25581","inReplyTo":null,"subject":"git merge-tree segfault","fromName":"Klas Lindberg","fromEmail":"klas.lindberg@gmail.com","sentAt":"2010-10-28T20:16:03Z","receivedAt":"2010-10-28T20:16:03Z","isPatch":false,"sender":{"key":"klas.lindberg@gmail.com","avatar":null},"body":"I haven't tried this on newer versions of git, but the release notes\nfor later releases don't mention merge-tree anywhere, so...\n\ngit version: 1.7.0\nuname -a: Linux tor 2.6.32-trunk-amd64 #1 SMP Sun Jan 10 22:40:40 UTC\n2010 x86_64 GNU/Linux\ndistro: Debian GNU/Linux squeeze/sid\n\nUnpack the attached tree, cd into it and run:\ngit merge-tree common master other\n\nI get the following result:\nadded in local\n  our    100644 d68dd4031d2ad5b7a3829ad7df6635e27a7daa22 t1.txt\nSegmentation fault\n\nThe exit code:\n139\n\nBR / Klas\n"},{"id":"154673","messageId":"SNT124-w295B9D20AA43A06DEFD13BC4440@phx.gbl","threadId":"25581","inReplyTo":"AANLkTinJQCqwRZpbO66VHrgxezedS1Ay3nr9kayiODi9@mail.gmail.com","subject":"RE: git merge-tree segfault","fromName":"Tim Mazid","fromEmail":"timmazid@hotmail.com","sentAt":"2010-10-28T20:25:31Z","receivedAt":"2010-10-28T20:25:31Z","isPatch":false,"sender":{"key":"timmazid@hotmail.com","avatar":null},"body":"\n> Date: Thu, 28 Oct 2010 22:16:03 +0200\n> Subject: git merge-tree segfault\n> From: klas.lindberg@gmail.com\n> To: git@vger.kernel.org\n>\n> I haven't tried this on newer versions of git, but the release notes\n> for later releases don't mention merge-tree anywhere, so...\n>\n> git version: 1.7.0\n> uname -a: Linux tor 2.6.32-trunk-amd64 #1 SMP Sun Jan 10 22:40:40 UTC\n> 2010 x86_64 GNU/Linux\n> distro: Debian GNU/Linux squeeze/sid\n>\n> Unpack the attached tree, cd into it and run:\n> git merge-tree common master other\n>\n> I get the following result:\n> added in local\n> our 100644 d68dd4031d2ad5b7a3829ad7df6635e27a7daa22 t1.txt\n> Segmentation fault\n>\n> The exit code:\n> 139\n>\n> BR / Klas\n\n\nConfirm this bug with arbitrary repository and arbitrary revs.\n\ngit version: 1.7.1\nuname -a: Linux Imperial-SSD-Overlord 2.6.35-trunk-amd64 #1 SMP\nTue Aug 17 08:22:25 UTC 2010 x86_64 GNU/Linux\ndistro: Debian GNU/Linux unstable/experimental\n\nSame exit code; 139.\n\nRegards,\nTim.\n\n \t\t \t   \t\t  "},{"id":"154851","messageId":"AANLkTikPPGYit4h_heg3j+bz_p8ug9TGwnH62+i-prFL@mail.gmail.com","threadId":"25581","inReplyTo":"SNT124-w295B9D20AA43A06DEFD13BC4440@phx.gbl","subject":"Re: git merge-tree segfault","fromName":"Klas Lindberg","fromEmail":"klas.lindberg@gmail.com","sentAt":"2010-10-30T16:27:03Z","receivedAt":"2010-10-30T16:27:03Z","isPatch":false,"sender":{"key":"klas.lindberg@gmail.com","avatar":null},"body":"On Thu, Oct 28, 2010 at 10:25 PM, Tim Mazid <timmazid@hotmail.com> wrote:\n>\n>> Date: Thu, 28 Oct 2010 22:16:03 +0200\n>> Subject: git merge-tree segfault\n>> From: klas.lindberg@gmail.com\n>> To: git@vger.kernel.org\n>>\n>> I haven't tried this on newer versions of git, but the release notes\n>> for later releases don't mention merge-tree anywhere, so...\n>>\n>> git version: 1.7.0\n>> uname -a: Linux tor 2.6.32-trunk-amd64 #1 SMP Sun Jan 10 22:40:40 UTC\n>> 2010 x86_64 GNU/Linux\n>> distro: Debian GNU/Linux squeeze/sid\n>>\n>> Unpack the attached tree, cd into it and run:\n>> git merge-tree common master other\n>>\n>> I get the following result:\n>> added in local\n>> our 100644 d68dd4031d2ad5b7a3829ad7df6635e27a7daa22 t1.txt\n>> Segmentation fault\n>>\n>> The exit code:\n>> 139\n>>\n>> BR / Klas\n>\n>\n> Confirm this bug with arbitrary repository and arbitrary revs.\n>\n> git version: 1.7.1\n> uname -a: Linux Imperial-SSD-Overlord 2.6.35-trunk-amd64 #1 SMP\n> Tue Aug 17 08:22:25 UTC 2010 x86_64 GNU/Linux\n> distro: Debian GNU/Linux unstable/experimental\n>\n> Same exit code; 139.\n>\n> Regards,\n> Tim.\n>\n>\n\nI made some more tests and discovered that the order of parameters to\nmerge-tree is important:\n\n * Let the tree contain one commit.\n * Let the tree contain branches \"common\", \"this\" and \"that\". All of\nthem point to the single commit.\n\n * Check out \"this\" and add/commit a file \"text\". \"text\" does not\nappear in \"that\".\n * Running \"git merge-tree common this that\" triggers the bug.\n * Running \"git merge-tree common that this\" does NOT trigger the bug.\n\nBR / Klas\n"},{"id":"154852","messageId":"AANLkTi=mA5BUQN02r5ZUz_kHL+iC4J=4LFqe=tyCqg-q@mail.gmail.com","threadId":"25581","inReplyTo":"AANLkTinJQCqwRZpbO66VHrgxezedS1Ay3nr9kayiODi9@mail.gmail.com","subject":"Re: git merge-tree segfault","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-10-30T17:25:06Z","receivedAt":"2010-10-30T17:25:06Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Thu, Oct 28, 2010 at 20:16, Klas Lindberg <klas.lindberg@gmail.com> wrote:\n> I haven't tried this on newer versions of git, but the release notes\n> for later releases don't mention merge-tree anywhere, so...\n\nDoesn't segfault for me. Probably since my version has this commit:\n\ncommit 21baa6e0c56d229866c02c4b42b8b53af648d853\nAuthor: Will Palmer <wmpalmer@gmail.com>\nDate:   Wed Jul 14 18:04:07 2010 +0100\n\n    merge-tree: fix where two branches share no changes\n\n    15b4f7a (merge-tree: use ll_merge() not xdl_merge(), 2010-01-16)\n    introduced a regression to merge-tree to cause it to segfault when merging\n    files which existed in one branch, but not in the other or in the\n    merge-base. This was caused by referencing entry->path at a time when\n    entry was known to be possibly-NULL.\n\n    To correct the problem, we save the path of the entry we came in with,\n    as the path should be the same among all the stages no matter which\n    sides are involved in the merge.\n\n    Signed-off-by: Will Palmer <wmpalmer@gmail.com>\n    Signed-off-by: Junio C Hamano <gitster@pobox.com>\n\n$ git tag --contains 21baa6e0c56d229866c02c4b42b8b53af648d853|grep ^v\nv1.7.2\nv1.7.2.1\nv1.7.2.2\nv1.7.2.3\nv1.7.2.3.msysgit.0\nv1.7.3\nv1.7.3-rc0\nv1.7.3-rc1\nv1.7.3-rc2\nv1.7.3.1\nv1.7.3.1.msysgit.0\nv1.7.3.2\nv1.7.3.2.msysgit.0\n"},{"id":"154853","messageId":"4CCC5542.8020105@debugon.org","threadId":"25581","inReplyTo":"AANLkTinJQCqwRZpbO66VHrgxezedS1Ay3nr9kayiODi9@mail.gmail.com","subject":"Re: git merge-tree segfault","fromName":"Mathias Lafeldt","fromEmail":"misfire@debugon.org","sentAt":"2010-10-30T17:26:26Z","receivedAt":"2010-10-30T17:26:26Z","isPatch":false,"sender":{"key":"misfire@debugon.org","avatar":"https://avatars.githubusercontent.com/u/158074?v=4"},"body":"On 10/28/2010 10:16 PM, Klas Lindberg wrote:\n> I haven't tried this on newer versions of git, but the release notes\n> for later releases don't mention merge-tree anywhere, so...\n> \n> git version: 1.7.0\n> uname -a: Linux tor 2.6.32-trunk-amd64 #1 SMP Sun Jan 10 22:40:40 UTC\n> 2010 x86_64 GNU/Linux\n> distro: Debian GNU/Linux squeeze/sid\n> \n> Unpack the attached tree, cd into it and run:\n> git merge-tree common master other\n> \n> I get the following result:\n> added in local\n>   our    100644 d68dd4031d2ad5b7a3829ad7df6635e27a7daa22 t1.txt\n> Segmentation fault\n> \n> The exit code:\n> 139\n> \n> BR / Klas\n\nLooks like this has been fixed by 21baa6e (merge-tree: fix where two\nbranches share no changes, 2010-07-14).\n\n$ git merge-tree common master other\nadded in local\n  our    100644 d68dd4031d2ad5b7a3829ad7df6635e27a7daa22 t1.txt\n\n$ echo $?\n0\n\n$ git --version \ngit version 1.7.3.2\n\n-Mathias\n"},{"id":"154854","messageId":"AANLkTi=2JHqXO75Ckgrg7R1B2_nhaPukR6tkk9EoFjPd@mail.gmail.com","threadId":"25581","inReplyTo":"4CCC5542.8020105@debugon.org","subject":"Re: git merge-tree segfault","fromName":"Klas Lindberg","fromEmail":"klas.lindberg@gmail.com","sentAt":"2010-10-30T18:11:22Z","receivedAt":"2010-10-30T18:11:22Z","isPatch":false,"sender":{"key":"klas.lindberg@gmail.com","avatar":null},"body":"Beautiful, and it's in Debian/squeeze too  :-)\n\nThanks for finding the fixed version. I was just about to make a\nkludge in my porcelain to work around this.\n\nBR / Klas\n\nOn Sat, Oct 30, 2010 at 7:26 PM, Mathias Lafeldt <misfire@debugon.org> wrote:\n> On 10/28/2010 10:16 PM, Klas Lindberg wrote:\n>> I haven't tried this on newer versions of git, but the release notes\n>> for later releases don't mention merge-tree anywhere, so...\n>>\n>> git version: 1.7.0\n>> uname -a: Linux tor 2.6.32-trunk-amd64 #1 SMP Sun Jan 10 22:40:40 UTC\n>> 2010 x86_64 GNU/Linux\n>> distro: Debian GNU/Linux squeeze/sid\n>>\n>> Unpack the attached tree, cd into it and run:\n>> git merge-tree common master other\n>>\n>> I get the following result:\n>> added in local\n>>   our    100644 d68dd4031d2ad5b7a3829ad7df6635e27a7daa22 t1.txt\n>> Segmentation fault\n>>\n>> The exit code:\n>> 139\n>>\n>> BR / Klas\n>\n> Looks like this has been fixed by 21baa6e (merge-tree: fix where two\n> branches share no changes, 2010-07-14).\n>\n> $ git merge-tree common master other\n> added in local\n>  our    100644 d68dd4031d2ad5b7a3829ad7df6635e27a7daa22 t1.txt\n>\n> $ echo $?\n> 0\n>\n> $ git --version\n> git version 1.7.3.2\n>\n> -Mathias\n>\n"}]}