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

Re: [PATCH] unpack-trees.c: fix writing "link" index ext with null base oid

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 12, 2019, 16:49 UTC
Message-ID
<xmqq1s4deyuw.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<CABPp-BF+q0QY1YAKOk4iSrCRuEc7xsG7iqCzeDD9v8+jmvQvzg@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 15 quoted lines
>> There is also another side fix in remove_split_index() that causes a
>> crash when doing "git update-index --no-split-index" when base_oid in
>> the index file is null. In this case we will not load
>> istate->split_index->base but we dereference it anyway and are rewarded
>> with a segfault. This should not happen anymore, but it's still wrong to
>> dereference a potential NULL pointer, especially when we do check for
>> NULL pointer in the next code.
>>
>> Reported-by: Luke Diamand <luke@diamand.org>
>> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
>
> Thanks for digging this down and fixing it.  When I saw this split
> index bug bisect to me that my heart sank a little; there's so much of
> that code I don't understand.  Nice to see you've already come along
> and fixed it all up.  :-)
Thanks, all.
Previous: Elijah NewrenNext: Ævar Arnfjörð Bjarmason
Message 11 of 16 in “could not freshen shared index ..../sharedindex.0000000000000000000000000000000000000000'”
  1. Luke DiamandFeb 6, 2019
  2. Christian CouderFeb 6, 2019
  3. Duy NguyenFeb 8, 2019
  4. Luke DiamandFeb 8, 2019
  5. Duy NguyenFeb 9, 2019
  6. Luke DiamandFeb 9, 2019
  7. Duy NguyenFeb 9, 2019
  8. unpack-trees.c: fix writing "link" index ext with null base oidNguyễn Thái Ngọc Duy, Feb 9, 2019
  9. Luke DiamandFeb 9, 2019
  10. Elijah NewrenFeb 12, 2019
  11. Junio C HamanoFeb 12, 2019
  12. Ævar Arnfjörð BjarmasonFeb 12, 2019
  13. read-cache.c: fix writing "link" index ext with null base oidNguyễn Thái Ngọc Duy, Feb 13, 2019
  14. Ævar Arnfjörð BjarmasonFeb 13, 2019
  15. Junio C HamanoFeb 8, 2019
  16. Duy NguyenFeb 9, 2019

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.