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

Re: [PATCH v2 0/4] Fix mem leaks of recent object store conversions.

From
Jeff King <peff@peff.net>
Date
May 11, 2018, 08:37 UTC
Message-ID
<20180511083723.GB22086@sigill.intra.peff.net>
In-Reply-To
<20180510195849.28023-1-sbeller@google.com>
On Thu, May 10, 2018 at 12:58:45PM -0700, Stefan Beller wrote:
Show 6 quoted lines
> This series replaces the two commits that were queued on sb/object-store-replace,
> fixing memory leaks that were recently introduced.
> 
> Compared to v1, I merged the two independent series from yesterday,
> rewrote the commit message to clear up Junios confusion and addresses Peffs
> comments for the packfiles as well.
Mostly. :)

My one remaining complaint is that the bitmap code may hold on to a dangling pointer to a packed_git after this series.

I think that is part of a larger problem, though, which is that the bitmap code's globals need to be part of the struct raw_object_store. I think this can already cause problems before your series if we were to try to use bitmaps in both a superproject and a submodule in the same process, though I think we'd at least hit the "ignoring extra bitmap file" code path in open_pack_bitmap_1(). So right now it's an annoyance, but after your series it becomes a potential segfault.

-Peff
Previous: Stefan BellerNext: Stefan Beller
Message 6 of 7 in “Fix mem leaks of recent object store conversions.”
  1. 0/4 Fix mem leaks of recent object store conversions.Stefan Beller, May 10, 2018
  2. 1/4 packfile: close and free packs upon releasing an object storeStefan Beller, May 10, 2018
  3. 2/4 packfile.h: remove all extern keywordsStefan Beller, May 10, 2018
  4. 3/4 object.c: free replace map in raw_object_store_clearStefan Beller, May 10, 2018
  5. 4/4 replace-object.c: remove the_repository from prepare_replace_objectStefan Beller, May 10, 2018
  6. Jeff KingMay 11, 2018
  7. Stefan BellerMay 11, 2018

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.