git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: Derrick Stolee <stolee@gmail.com>
Cc: Jonathan Tan <jonathantanmy@google.com>, git@vger.kernel.org
Subject: Re: [PATCH] commit-graph: avoid memory leaks
Date: Mon, 4 May 2020 16:15:00 -0600	[thread overview]
Message-ID: <20200504221500.GG45250@syl.local> (raw)
In-Reply-To: <16be6de4-3453-2fc2-2881-7068bf674517@gmail.com>

On Mon, May 04, 2020 at 04:20:41PM -0400, Derrick Stolee wrote:
> On 5/4/2020 3:13 PM, Jonathan Tan wrote:
> > A fuzzer running on the entry point provided by fuzz-commit-graph.c
> > revealed a memory leak when parse_commit_graph() creates a struct
> > bloom_filter_settings and then returns early due to error. Fix that
> > error by always freeing that struct first (if it exists) before
> > returning early due to error.
>
> This fuzzer is an excellent tool that I hope can continue to be
> extended to other features. Here is a case where it found an error in
> a feature long after the integration was introduced.
>
> > While making that change, I also noticed another possible memory leak -
> > when the BLOOMDATA chunk is provided but not BLOOMINDEXES. Also fix that
> > error.
>
> Thanks for discovering these issues, and for fixing them!
>
> Reviewed-by: Derrick Stolee <dstolee@microsoft.com>

Since it already appears to be queued, I'm not sure that my review is
adding much. But, this fix looks very good to me, and I am grateful for
you running a fuzzer against this code, and finding/fixing bugs in it.

  Reviewed-by: Taylor Blau <me@ttaylorr.com>

> Thanks,
> -Stolee

Thanks,
Taylor

  reply	other threads:[~2020-05-04 22:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 19:13 [PATCH] commit-graph: avoid memory leaks Jonathan Tan
2020-05-04 20:20 ` Derrick Stolee
2020-05-04 22:15   ` Taylor Blau [this message]
2020-05-04 21:09 ` 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=20200504221500.GG45250@syl.local \
    --to=me@ttaylorr.com \
    --cc=git@vger.kernel.org \
    --cc=jonathantanmy@google.com \
    --cc=stolee@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).