git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lars Schneider <larsxschneider@gmail.com>
To: "René Scharfe" <l.s.r@web.de>
Cc: Git List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>,
	Pranit Bauva <pranit.bauva@gmail.com>
Subject: Re: [PATCH] cocci: detect useless free(3) calls
Date: Sat, 11 Feb 2017 20:31:15 +0100	[thread overview]
Message-ID: <5DF3AA3E-90C6-443C-A22C-489CE2C89A51@gmail.com> (raw)
In-Reply-To: <7e10f934-f084-ceb4-00eb-b75cdb01886b@web.de>


> On 11 Feb 2017, at 14:58, René Scharfe <l.s.r@web.de> wrote:
> 
> Add a semantic patch for removing checks that cause free(3) to only be
> called with a NULL pointer, as that must be a programming mistake.
> 
> Signed-off-by: Rene Scharfe <l.s.r@web.de>
> ---
> No cases are found in master or next, but 1d263b93 (bisect--helper:
> `bisect_next_check` & bisect_voc shell function in C) introduced four
> of them to pu.

Hi Rene,

how do you run these checks on the entire Git source?
Do you run each semantic patch file on the source like this?

spatch --sp-file contrib/coccinelle/qsort.cocci --dir /path/to/git/git
...
spatch --sp-file contrib/coccinelle/free.cocci --dir /path/to/git/git

How stable do you consider these checks? Would it make sense to run them
as part of the Travis-CI build [1]? 

Thanks,
Lars

[1] https://travis-ci.org/git/git/branches

  parent reply	other threads:[~2017-02-11 19:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-11 13:58 [PATCH] cocci: detect useless free(3) calls René Scharfe
2017-02-11 19:01 ` Junio C Hamano
2017-02-11 19:31 ` Lars Schneider [this message]
2017-02-11 19:50   ` René Scharfe

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=5DF3AA3E-90C6-443C-A22C-489CE2C89A51@gmail.com \
    --to=larsxschneider@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=l.s.r@web.de \
    --cc=pranit.bauva@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).