All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Junio C Hamano <jch@google.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>,
	Glen Choo <chooglen@google.com>
Subject: jk/diff-files-cleanup-fix + related un-picked-up ab/* (was: What's cooking in git.git (Jul 2022, #05; Sun, 17))
Date: Mon, 18 Jul 2022 12:15:00 +0200	[thread overview]
Message-ID: <220718.86h73eyb31.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <xmqq7d4bt8n4.fsf@gitster.g>


On Sun, Jul 17 2022, Junio C Hamano wrote:

> * jk/diff-files-cleanup-fix (2022-07-12) 1 commit
>   (merged to 'next' on 2022-07-13 at 9db5235d01)
>  + diff-files: move misplaced cleanup label
>
>  An earlier attempt to plug leaks placed a clean-up label to jump to
>  at a bogus place, which as been corrected.
>
>  Will merge to 'master'.
>  source: <Ys0c0ePxPOqZ/5ck@coredump.intra.peff.net>

(As noted before) that fix looks good, thanks Jeff!

But here's a gentle *poke* about picking up [1], which is a related
follow-up series (but applies directly on master).

It fixes some other minor issues in my earlier release_revisions()
series, and then goes on to fix other common memory leaks that didn't
make it into that initial series.

These in particular & somewhat tricky or non-obvious, and could use
careful review:

    https://lore.kernel.org/git/patch-4.6-9bff7b10197-20220713T130511Z-avarab@gmail.com/
    https://lore.kernel.org/git/patch-6.6-4a581a4a6ce-20220713T130511Z-avarab@gmail.com/

The latter of those proposes to fix what's a common leak pattern in the
codebase in a particular way, I'd be interested to know what people
think of that approach.

There was a related earlier discussion between me and Glen at:

	https://lore.kernel.org/git/220713.86o7xs3g76.gmgdl@evledraar.gmail.com/

I.e. whether we should do an xstrdup() (or equivalent) in those cases,
so we wouldn't have to mix up free()-able data (strvec etc) with
un-free() able (main()'s "argv") in various APIs.

There are more drastic ways to address it, but I think that 6/6 is the
best trade-off in terms of a narrow fix & fixing that class of leak.

1. https://lore.kernel.org/git/cover-0.6-00000000000-20220713T130511Z-avarab@gmail.com/

  parent reply	other threads:[~2022-07-18 10:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-18  3:14 What's cooking in git.git (Jul 2022, #05; Sun, 17) Junio C Hamano
2022-07-18  8:29 ` zh/ls-files-format (was: What's cooking in git.git (Jul 2022, #05; Sun, 17)) Ævar Arnfjörð Bjarmason
2022-07-18 10:15 ` Ævar Arnfjörð Bjarmason [this message]
2022-07-18 17:25   ` jk/diff-files-cleanup-fix + related un-picked-up ab/* Junio C Hamano
2022-07-18 16:11 ` What's cooking in git.git (Jul 2022, #05; Sun, 17) Victoria Dye
2022-07-18 20:24   ` Junio C Hamano

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=220718.86h73eyb31.gmgdl@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=chooglen@google.com \
    --cc=git@vger.kernel.org \
    --cc=jch@google.com \
    --cc=peff@peff.net \
    /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.