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

Re: [RFD PATCH 0/3] Free all the memory!

From
Junio C Hamano <gitster@pobox.com>
Date
May 17, 2016, 18:16 UTC
Message-ID
<xmqqinycwnx2.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAGZ79kaJoAxqtsTuErQSgJiVeD_vdZ1MQXKr-LTtyro-FbscTQ@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
> So as a developer I wish we would close all leaks that are non-concerning.

Valgrind suppression (and if you use other tools, suppression for them) sounds like the way to go, I would think.

Reducing false positive is a good goal; it helps to highlight the real problems. But we need to find a way to do so without hurting the use by the end users by making them pay the unnecessary cost to free() at the end and by cluttering the code with #ifdefs that makes it easier to introduce subtle bugs.

Show 8 quoted lines
> David writes:
>> AFAIK, nothing in the "definitely lost" category is fixed by your rev-parse patch.
>>
>> I don't think we care that much about "still reachable" memory -- I only care about lost memory.  I could imagine, I guess, something that happens to save a pointer to a bunch of memory that should be freed, but I don't think that's the common case.
>
> As said above I'd want them to be fixed for me as a developer for
> better automated tooling and detection. (The alternative to fix the automated
> tooling is a no-no for me ;)

Does the word "no-no" mean what you seem to think it means? It sounds as if you are saying "fixing tools to reduce false positives is fundamentally wrong, I refuse to go in that direction".

Previous: Stefan BellerNext: Stefan Beller
Message 10 of 15 in “Free all the memory!”
  1. 0/3 Free all the memory!Stefan Beller, May 17, 2016
  2. 1/3 mv: free memory at the end if desiredStefan Beller, May 17, 2016
  3. Torsten BögershausenMay 17, 2016
  4. 2/3 pack-redundant: free all memoryStefan Beller, May 17, 2016
  5. Eric SunshineMay 17, 2016
  6. 3/3 rev-parse: free all memoryStefan Beller, May 17, 2016
  7. Eric SunshineMay 17, 2016
  8. Eric WongMay 17, 2016
  9. Stefan BellerMay 17, 2016
  10. Junio C HamanoMay 17, 2016
  11. Stefan BellerMay 17, 2016
  12. Eric WongMay 18, 2016
  13. Ævar Arnfjörð BjarmasonMay 18, 2016
  14. David TurnerMay 17, 2016
  15. Matthieu MoyMay 17, 2016

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.