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

Re: What's cooking in git.git (Sep 2022, #08; Tue, 27)

From
Victoria Dye <vdye@github.com>
Date
Sep 28, 2022, 01:52 UTC
Message-ID
<be8f11f2-c4ad-0542-066b-3bbc99a16dae@github.com>
In-Reply-To
<xmqqtu4s1q1m.fsf@gitster.g>
Junio C Hamano wrote:
Show 11 quoted lines
> * vd/fix-unaligned-read-index-v4 (2022-09-23) 1 commit
>  - read-cache: avoid misaligned reads in index v4
> 
>  The codepath that reads from the index v4 had unaligned memory
>  accesses, which has been corrected.
> 
>  Expecting a reroll.
>  cf. <Yy4nkEnhuzt2iH+R@coredump.intra.peff.net>
>  cf. <bb3a2470-7ff5-e4a6-040a-96e0e3833978@gmail.com>
>  source: <pull.1366.git.1663962236069.gitgitgadget@gmail.com>
> 

How drastic an update were you expecting for this re-roll? To keep the fix minimal (that is, focused on 'create_from_disk()'), I was planning to just add some comments explaining the implementation (in response to [1]). If the goal is to get this merged quickly, I'd want to avoid a larger refactor (suggested in [2] & [3]), since doing so would either make the implementations of "read from disk" ('create_from_disk()') and "write to disk" ('copy_cache_entry_to_ondisk()') different/difficult to compare, or would involve a more invasive refactor to update both functions [4].

However, if there's no time pressure (after all, this bug has existed since the introduction of index v4!), I'm happy to do that refactor. It would expand the series to 2 or 3 patches, but should address all of the suggestions made so far and make the code overall a bit clearer.

Let me know what you think!
Thanks,
- Victoria

[1] https://lore.kernel.org/git/bb3a2470-7ff5-e4a6-040a-96e0e3833978@gmail.com/ [2] https://lore.kernel.org/git/Yy4nkEnhuzt2iH+R@coredump.intra.peff.net/ [3] https://lore.kernel.org/git/YzH+IPFBGleIsAUe@coredump.intra.peff.net/ [4] https://lore.kernel.org/git/e5954e90-6b5c-46a6-0842-b3d7d1e06b33@github.com/

Previous: Junio C HamanoNext: Jeff King
Message 2 of 11 in “What's cooking in git.git (Sep 2022, #08; Tue, 27)”
  1. Junio C HamanoSep 27, 2022
  2. Victoria DyeSep 28, 2022
  3. vd/fix-unaligned-read-index-v4, was Re: What's cooking in git.git (Sep 2022, #08; Tue, 27)Jeff King, Sep 28, 2022
  4. 1/3 pack-bitmap: make read_be32() publicJeff King, Sep 28, 2022
  5. 2/3 read-cache: read on-disk entries in byte orderJeff King, Sep 28, 2022
  6. Jeff KingSep 29, 2022
  7. Junio C HamanoSep 29, 2022
  8. 3/3 read-cache: use read_be32() in create_from_disk()Jeff King, Sep 28, 2022
  9. Junio C HamanoSep 28, 2022
  10. Ævar Arnfjörð BjarmasonSep 28, 2022
  11. Junio C HamanoSep 28, 2022

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.