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

Re: [PATCH v3] sparse index: fix use-after-free bug in cache_tree_verify()

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Oct 14, 2021, 13:34 UTC
Message-ID
<6dd3ba9f-7054-93f3-7798-d4a4a211899a@gmail.com>
In-Reply-To
<xmqqwnmnjnn5.fsf@gitster.g>
Hi Junio
On 08/10/2021 20:57, Junio C Hamano wrote:
Show 29 quoted lines
> Phillip Wood <phillip.wood123@gmail.com> writes:
> 
>> On 07/10/2021 22:23, Junio C Hamano wrote:
>>> "Phillip Wood via GitGitGadget" <gitgitgadget@gmail.com> writes:
>>>
>>>>        * Fixed the spelling of Stolee's name (sorry Stolee)
>>>>        * Added "-q" to the test to prevent a failure on Microsoft's fork[1]
>>>>            [1]
>>>>       https://lore.kernel.org/git/ebbe8616-0863-812b-e112-103680f7298b@gmail.com/
>>> I've seen the exchange, but ...
>>>
>>>> -	for OPERATION in "merge -m merge" cherry-pick rebase
>>>> +	for OPERATION in "merge -m merge" cherry-pick "rebase --apply -q" "rebase --merge"
>>>>    	do
>>> ... it looks too strange that only one of them requires a "--quiet"
>>> option.  Is it a possibility to get whoever's fork corrected so that
>>> it behaves sensibly without requiring the "-q" option only for the
>>> particular rebase backend?
>>
>> The issue is caused by a patch that Microsoft is carrying that stops
>> apply from creating paths with the skip-worktree bit set. As they're
>> upstreaming their sparse index and checkout work I expect it will show
>> up on the list sooner or later. I agree the "-q" is odd and it also
>> means the test is weaker but I'm not sure what else we can do.
> 
> Perhaps passing "-q" to the other variant of "rebase" would make it
> clear that (1) we do not want to worry about traces involved in the
> verbose message generation and (2) there is nothing fishy going on
> in only one of the "rebase" backends.

I'm not sure about that. There are really three levels of output from rebase - quiet, normal and verbose. I think passing "-q" suppresses virtually all the output - there is no indication of which commits have been picked. As test appears to be comparing the output of the command for the sparse and non-spare case as a proxy for "it behaves the same for sparse and non-sparse checkouts/indexes" passing "-q" to rebase weakens the test considerably. Stolee indicated [1] that he is happy for us to drop the "-q" for the "--apply" case so I'd be inclined to go back to your corrected version of V2.

Best Wishes
Phillip

[1] https://lore.kernel.org/git/e281c2e2-2044-1a11-e2bc-5ab3ee92c300@gmail.com/

Previous: Junio C HamanoNext: Junio C Hamano
Message 19 of 26 in “[RFC] sparse index: fix use-after-free bug in cache_tree_verify()”
  1. [RFC] sparse index: fix use-after-free bug in cache_tree_verify()Phillip Wood via GitGitGadget, Oct 6, 2021
  2. Derrick StoleeOct 6, 2021
  3. Phillip WoodOct 6, 2021
  4. Derrick StoleeOct 6, 2021
  5. Junio C HamanoOct 6, 2021
  6. Derrick StoleeOct 6, 2021
  7. sparse index: fix use-after-free bug in cache_tree_verify()Phillip Wood via GitGitGadget, Oct 7, 2021
  8. Derrick StoleeOct 7, 2021
  9. Phillip WoodOct 7, 2021
  10. Derrick StoleeOct 7, 2021
  11. Phillip WoodOct 7, 2021
  12. Derrick StoleeOct 7, 2021
  13. Phillip WoodOct 7, 2021
  14. sparse index: fix use-after-free bug in cache_tree_verify()Phillip Wood via GitGitGadget, Oct 7, 2021
  15. Junio C HamanoOct 7, 2021
  16. Phillip WoodOct 8, 2021
  17. Derrick StoleeOct 8, 2021
  18. Junio C HamanoOct 8, 2021
  19. Phillip WoodOct 14, 2021
  20. Junio C HamanoOct 14, 2021
  21. Bagas SanjayaOct 8, 2021
  22. Phillip WoodOct 14, 2021
  23. sparse index: fix use-after-free bug in cache_tree_verify()Phillip Wood via GitGitGadget, Oct 16, 2021
  24. Junio C HamanoOct 17, 2021
  25. Derrick StoleeOct 17, 2021
  26. Phillip WoodOct 18, 2021

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.