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

Re: [PATCH] cocci: detect useless free(3) calls

From
René Scharfe <l.s.r@web.de>
Date
Feb 11, 2017, 19:50 UTC
Message-ID
<ca01f8de-f5ce-2201-450d-cadd6aca7cb8@web.de>
In-Reply-To
<5DF3AA3E-90C6-443C-A22C-489CE2C89A51@gmail.com>
Am 11.02.2017 um 20:31 schrieb Lars Schneider:
Show 6 quoted lines
> 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

With "make coccicheck", which runs spatch against the items in the make variable C_SOURCES, for all .cocci files.

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

There seem to have been problems with older versions[2], but I'm not aware of other issues.

Having these checks run automatically would be nice because they require a special tool which I guess not everybody is willing (or able) to install and because they take multiple minutes.

René
[2] https://public-inbox.org/git/014ef44e-9dd8-40b3-a3ec-b483f938ee02@web.de/
Previous: Lars Schneider
Message 4 of 4 in “cocci: detect useless free(3) calls”
  1. cocci: detect useless free(3) callsRené Scharfe, Feb 11, 2017
  2. Junio C HamanoFeb 11, 2017
  3. Lars SchneiderFeb 11, 2017
  4. René ScharfeFeb 11, 2017

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.