git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Null deref in recursive merge in df73af5f667a479764d2b2195cb0cb60b0b89e3d

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 30, 2009, 07:54 UTC
Message-ID
<7vws5qhaho.fsf@alter.siamese.dyndns.org>
In-Reply-To
<C69698D6.61E1C%jbenjore@whitepages.com>
Josh ben Jore <jbenjore@whitepages.com> writes:
> It is a very accurate shot in the dark. It appears to have fixed it when
> applied to 0a53e9ddeaddad63ad106860237bbf53411d11a7 GIT 1.6.4. I'll be
> trying this against v1.6.0.4 tomorrow.

Thanks. After re-reading the patch, I am reasonably sure that it is the right fix.

Earlier we fixed similar issues with bf74106 (merge-recursive: never leave index unmerged while recursing, 2009-05-09) and 0c44c94 (merge-recursive: do not die on a conflicting submodule, 2009-04-29).

The former is a fix to 36e3b5e (merge-recursive: mark rename/delete conflict as unmerged, 2008-12-22) which is probably newer than 1.6.0.4 codebase, and unless you are using submodules, the latter is probalby also safe to ignore if you are cherry-picking to the ancient 1.6.0.4 codebase.

Show 30 quoted lines
>> The codepath saw that one branch renamed dev-ubuntu/ stuff to dev/ at that
>> "unmerged" path, while the other branch added something else to the same
>> path, and decided to add that at an alternative path, and the intent of
>> that is so that it can safely resolve the "renamed" side to its final
>> destination.  The added update_file() call is about finishing that
>> conflict resolution the code forgets to do.
>> 
>>  merge-recursive.c |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>> 
>> diff --git a/merge-recursive.c b/merge-recursive.c
>> index d415c41..868b383 100644
>> --- a/merge-recursive.c
>> +++ b/merge-recursive.c
>> @@ -955,6 +955,7 @@ static int process_renames(struct merge_options *o,
>>                                 new_path = unique_path(o, ren1_dst, branch2);
>>                                 output(o, 1, "Adding as %s instead",
>> new_path);
>>                                 update_file(o, 0, dst_other.sha1,
>> dst_other.mode, new_path);
>> +                               update_file(o, 0, src_other.sha1,
>> src_other.mode, ren1_dst);
>>                         } else if ((item = string_list_lookup(ren1_dst,
>> renames2Dst))) {
>>                                 ren2 = item->util;
>>                                 clean_merge = 0;
>> 
>
> Thanks very much,
> Josh
Previous: Josh ben JoreNext: Junio C Hamano
Message 5 of 11 in “Fw: Null deref in recursive merge in df73af5f667a479764d2b2195cb0cb60b0b89e3d”
  1. Josh ben JoreJul 28, 2009
  2. Josh ben JoreJul 29, 2009
  3. Junio C HamanoJul 30, 2009
  4. Josh ben JoreJul 30, 2009
  5. Junio C HamanoJul 30, 2009
  6. merge-recursive: don't segfault while handling rename clashesJunio C Hamano, Jul 31, 2009
  7. Clemens BuchacherJul 29, 2009
  8. Josh ben JoreJul 29, 2009
  9. Junio C HamanoJul 30, 2009
  10. Johannes SchindelinJul 30, 2009
  11. Fredrik KuivinenAug 18, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.