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

Re: [PATCH v2 2/2] packfile: fix corruption due to stale delta base cache entries

From
Patrick Steinhardt <ps@pks.im>
Date
Oct 7, 2026, 05:29 UTC
Message-ID
<asXYtkkRs6kvEjBJ@pks.im>
In-Reply-To
<xmqqse2id2kq.fsf@gitster.g>
On Tue, Oct 06, 2026 at 12:57:41PM -0700, Junio C Hamano wrote:
Show 10 quoted lines
> Patrick Steinhardt <ps@pks.im> writes:
> 
> > Note that the added test reliably reproduces the above bug on my machine
> > that uses NixOS at c59305bab206 (cosmic-applets: add missing runtime
> > dependency (#566040), 2026-10-01) with glibc 2.44-25. But as we rely on
> > specific allocation behaviour of glibc it is very likely that the test
> > will not work on other platforms.
> 
> In other words, the test will not detect the bug, when the fix is
> reverted, unless the glibc allocator is used?

It is specific to memory allocation patterns and thus to the platform, yes. But I just confirmed that the test also fails on for example Alpine Linux, so it even reproduces with musl libc. I haven't tested any other platforms though.

Show 5 quoted lines
> Adding an unreliable reproducer for a bug that is already fixed may be
> of dubious value.  However, even if the test is unreliable (since
> other allocators might hide the bug when the fix is reverted), it may
> be OK as long as it catches the bug on widely used configurations and
> does not trigger false positives.

Yeah, it at least catches the bug on some systems. And I think even if it eventually didn't anymore, it exercises a part of our system (doing submodule merges across many submodules) that wasn't previously exercised, I think. So it would still have some value there.

> On the other hand, the earlier suggestion to write custom low-level
> code to simulate a colliding allocation address somehow smells like a
> maintenance burden to me.

Agreed. It simply is too much boilerplate for too specific a failure, if you ask me.

Patrick
Previous: Junio C Hamano
Message 18 of 18 in “packfile: fix corruption due to stale delta base cache entries”
  1. 0/2 packfile: fix corruption due to stale delta base cache entriesPatrick Steinhardt, Oct 2, 2026
  2. 1/2 packfile: move around `close_pack()`Patrick Steinhardt, Oct 2, 2026
  3. Mark C. Chu-CarrollOct 2, 2026
  4. Patrick SteinhardtOct 2, 2026
  5. 2/2 packfile: fix corruption due to stale delta base cache entriesPatrick Steinhardt, Oct 2, 2026
  6. Guillaume ChauvelOct 2, 2026
  7. Patrick SteinhardtOct 2, 2026
  8. Philippe BlainOct 2, 2026
  9. Patrick SteinhardtOct 2, 2026
  10. Jeff KingOct 2, 2026
  11. Patrick SteinhardtOct 5, 2026
  12. Jeff KingOct 7, 2026
  13. Junio C HamanoOct 7, 2026
  14. 0/2 packfile: fix corruption due to stale delta base cache entriesPatrick Steinhardt, Oct 6, 2026
  15. 1/2 packfile: move around `close_pack()`Patrick Steinhardt, Oct 6, 2026
  16. 2/2 packfile: fix corruption due to stale delta base cache entriesPatrick Steinhardt, Oct 6, 2026
  17. Junio C HamanoOct 6, 2026
  18. Patrick SteinhardtOct 7, 2026

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.