threads / discuss / 43629

Re: git-merge-recursive segmentation error

Subject: Re: git-merge-recursive segmentation error

## tl;dr

6 messages between Dec 20, 2006 and Dec 20, 2006.

replies: 5people: 4as markdown or json

Junio C Hamano· Dec 20, 2006, 02:25 UTC · lore
Luben Tuikov <ltuikov@yahoo.com> writes:
Show 5 quoted lines
> I also ran git-bisect twice over two well known but overlapping
> good-bad regions and I get the same commit as being the culprit.
> It seems to be commit 1510fea781cb0517eeba8c378964f7bc4f9577ab.
>
>     Luben
Ooooooops.
Junio C Hamano· Dec 20, 2006, 02:30 UTC · re: Junio C Hamano · lore
Junio C Hamano <junkio@cox.net> writes:
Show 9 quoted lines
> Luben Tuikov <ltuikov@yahoo.com> writes:
>
>> I also ran git-bisect twice over two well known but overlapping
>> good-bad regions and I get the same commit as being the culprit.
>> It seems to be commit 1510fea781cb0517eeba8c378964f7bc4f9577ab.
>>
>>     Luben
>
> Ooooooops.
1510fe is buggy and it is my fault.
For now, this _should_ get you keep going.

However, if this fixes it for you, that means we would still have the problem on Cygwin X-<.

-- >8 -- [PATCH] fix populate-filespec

I hand munged the original patch when committing 1510fea78.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 diff.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/diff.c b/diff.c
index 9974435..6e6f2a7 100644
--- a/diff.c
+++ b/diff.c
@@ -1223,7 +1223,7 @@ static int reuse_worktree_file(const char *name, const unsigned char *sha1, int
 	 * objects however would tend to be slower as they need
 	 * to be individually opened and inflated.
 	 */
-	if (FAST_WORKING_DIRECTORY && !want_file && has_sha1_pack(sha1, NULL))
+	if (!FAST_WORKING_DIRECTORY && !want_file && has_sha1_pack(sha1, NULL))
 		return 0;
 
 	len = strlen(name);
-- 
1.4.4.2.g205bf
Johannes Schindelin· Dec 20, 2006, 02:33 UTC · re: Junio C Hamano · lore
Hi,
On Tue, 19 Dec 2006, Junio C Hamano wrote:
Show 13 quoted lines
> Junio C Hamano <junkio@cox.net> writes:
> 
> > Luben Tuikov <ltuikov@yahoo.com> writes:
> >
> >> I also ran git-bisect twice over two well known but overlapping
> >> good-bad regions and I get the same commit as being the culprit.
> >> It seems to be commit 1510fea781cb0517eeba8c378964f7bc4f9577ab.
> >>
> >>     Luben
> >
> > Ooooooops.
> 
> 1510fe is buggy and it is my fault.

You hand munging should not have led to any segmentation fault. It would be sooo nice to have the test case.

Ciao,
Luben Tuikov· Dec 20, 2006, 02:38 UTC · re: Junio C Hamano · lore
--- Junio C Hamano <junkio@cox.net> wrote:
Show 18 quoted lines
> Junio C Hamano <junkio@cox.net> writes:
> 
> > Luben Tuikov <ltuikov@yahoo.com> writes:
> >
> >> I also ran git-bisect twice over two well known but overlapping
> >> good-bad regions and I get the same commit as being the culprit.
> >> It seems to be commit 1510fea781cb0517eeba8c378964f7bc4f9577ab.
> >>
> >>     Luben
> >
> > Ooooooops.
> 
> 1510fe is buggy and it is my fault.
> 
> For now, this _should_ get you keep going.
> 
> However, if this fixes it for you, that means we would still
> have the problem on Cygwin X-<.
Yep -- that fixed it.
Thanks,
    Luben
Show 30 quoted lines
> 
> -- >8 --
> [PATCH] fix populate-filespec
> 
> I hand munged the original patch when committing 1510fea78.
> 
> Signed-off-by: Junio C Hamano <junkio@cox.net>
> ---
>  diff.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/diff.c b/diff.c
> index 9974435..6e6f2a7 100644
> --- a/diff.c
> +++ b/diff.c
> @@ -1223,7 +1223,7 @@ static int reuse_worktree_file(const char *name, const unsigned char
> *sha1, int
>  	 * objects however would tend to be slower as they need
>  	 * to be individually opened and inflated.
>  	 */
> -	if (FAST_WORKING_DIRECTORY && !want_file && has_sha1_pack(sha1, NULL))
> +	if (!FAST_WORKING_DIRECTORY && !want_file && has_sha1_pack(sha1, NULL))
>  		return 0;
>  
>  	len = strlen(name);
> -- 
> 1.4.4.2.g205bf
> 
> 
> 
Shawn Pearce· Dec 20, 2006, 02:43 UTC · re: Luben Tuikov · lore
Luben Tuikov <ltuikov@yahoo.com> wrote:
Show 9 quoted lines
> > Junio C Hamano <junkio@cox.net> writes:
> > 1510fe is buggy and it is my fault.
> > 
> > For now, this _should_ get you keep going.
> > 
> > However, if this fixes it for you, that means we would still
> > have the problem on Cygwin X-<.
> 
> Yep -- that fixed it.
It might be a problem on Cygwin.  :-)

I completely fail to see how this patch would cause a segfault downstream in xdl_merge. All this controls is do we mmap data from the working directory or decompress it from the ODB. Either way we should have loaded the file size or content into the diff_filespec.

My other related change (7da41f48c) in this area has a better chance of causing a problem as it may be bypassing loading the file content into the diff_filespec where before we were always loading it. However none of my testing ever showed that would cause a problem.

Junio C Hamano· Dec 20, 2006, 03:45 UTC · re: Shawn Pearce · lore
Shawn Pearce <spearce@spearce.org> writes:
> I completely fail to see how this patch would cause a segfault
> downstream in xdl_merge.  All this controls is do we mmap data from
> the working directory or decompress it from the ODB.  Either way we
> should have loaded the file size or content into the diff_filespec.
Me neither.  Quite puzzled...

← back to recent threads