All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: ab/commit-plug-leaks (was: What's cooking in git.git (Mar 2022, #05; Wed, 23))
Date: Fri, 25 Mar 2022 14:38:43 +0100	[thread overview]
Message-ID: <220325.86v8w2kurx.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <xmqqwngkm4am.fsf@gitster.g>


On Wed, Mar 23 2022, Junio C Hamano wrote:

> * 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

  reply	other threads:[~2022-03-25 13:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-24  3:13 What's cooking in git.git (Mar 2022, #05; Wed, 23) Junio C Hamano
2022-03-25 13:38 ` Ævar Arnfjörð Bjarmason [this message]
2022-03-26 16:05 ` fr/vimdiff-layout (was: What's cooking in git.git (Mar 2022, #05; Wed, 23)) Ævar Arnfjörð Bjarmason
2022-03-26 22:55   ` Fernando Ramos
2022-03-27  0:29     ` fr/vimdiff-layout Junio C Hamano
2022-03-27 13:18       ` [PATCH] tests: do roundtrip builtin doc & sanity checking Ævar Arnfjörð Bjarmason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=220325.86v8w2kurx.gmgdl@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.