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

ab/commit-plug-leaks (was: What's cooking in git.git (Mar 2022, #05; Wed, 23))

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Mar 25, 2022, 13:38 UTC
Message-ID
<220325.86v8w2kurx.gmgdl@evledraar.gmail.com>
In-Reply-To
<xmqqwngkm4am.fsf@gitster.g>
On Wed, Mar 23 2022, Junio C Hamano wrote:
Show 9 quoted lines
> * ab/commit-plug-leaks (2022-02-16) 2 commits
>  - commit: use strbuf_release() instead of UNLEAK()
>  - commit: fix "author_ident" leak
>
>  Leakfixes in the top-level called-once function.
>
>  Expecting a reroll.
>  I think UNLEAK->strbuf_release() is a regression.
>  source: <cover-0.2-00000000000-20220216T081844Z-avarab@gmail.com>

Re our earlier exchange ending in https://lore.kernel.org/git/xmqqczjbj0nf.fsf@gitster.g/ I still think it makes sense to get rid of the UNLEAK() there.

One reason not mentioned there (but which I do find useful) is that if we actually free the memory then you don't need to build with -DSUPPRESS_ANNOTATED_LEAKS to suppress these, which is useful e.g. when looking at valgrind output, as opposed to SANITIZE=leak where we do add -DSUPPRESS_ANNOTATED_LEAKS.

And since I submitted this topic our number of UNLEAK() in builtin/ is down from 29 to 23 with the queued release_revisions() topic.

But you seem to feel strongly that we should keep these specific UNLEAK() for reasons I don't really understand despite re-reading that exchange. I.e. the cost of doing the actual release is minuscule, and we have a lot of such strbuf_release() in builtin/*.c already.

But if you'd just like to drop this topic I understand, but I think it's ready to advance as is, but either way it's probably good to get it out of the current status

Previous: Junio C HamanoNext: Ævar Arnfjörð Bjarmason
Message 2 of 6 in “What's cooking in git.git (Mar 2022, #05; Wed, 23)”
  1. Junio C HamanoMar 24, 2022
  2. ab/commit-plug-leaks (was: What's cooking in git.git (Mar 2022, #05; Wed, 23))Ævar Arnfjörð Bjarmason, Mar 25, 2022
  3. fr/vimdiff-layout (was: What's cooking in git.git (Mar 2022, #05; Wed, 23))Ævar Arnfjörð Bjarmason, Mar 26, 2022
  4. Fernando RamosMar 26, 2022
  5. Junio C HamanoMar 27, 2022
  6. tests: do roundtrip builtin doc & sanity checkingÆvar Arnfjörð Bjarmason, Mar 27, 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.