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

Re: [PATCH] pack-revindex.c: don't close unopened file descriptors

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 1, 2021, 22:18 UTC
Message-ID
<nycvar.QRO.7.76.6.2103012312230.57@tvgsbejvaqbjf.bet>
In-Reply-To
<YDk1/y1CmsPYC88C@coredump.intra.peff.net>
Hi Peff,
On Fri, 26 Feb 2021, Jeff King wrote:
Show 8 quoted lines
> On Fri, Feb 26, 2021 at 11:31:02AM -0500, Taylor Blau wrote:
>
> > Dscho mentioned this to me privately when reviewing Coverity results for
> > -rc0. This one is legitimate, and the fix is easy enough, too.
>
> I'm excited that we might get Coverity results again. There were a lot
> of false positives, but I found its signal-to-noise ratio higher than
> almost every other static analysis tool I've looked at.

Indeed, the signal:noise ratio is pretty bad, mainly because of all the false positives (Coverity _really_ hates what we do with `strbuf_slopbuf`, it simply doesn't understand that we allocate `buf` only when needing to write characters into that buffer) and the "intentional" issues (we leak memory left and right in `builtin/`).

It does not help at all that Coverity has a bug for a pretty long while now where it simply throws up its digital hands in the air when it sees a GCC v10.x. I did find a work-around for Git for Windows' automated Coverity run, a work-around that is somewhat ugly yet necessary, sadly: https://github.com/git-for-windows/build-extra/commit/23eea104d53

Ciao, Dscho

Previous: Jeff KingNext: Junio C Hamano
Message 3 of 4 in “pack-revindex.c: don't close unopened file descriptors”
  1. pack-revindex.c: don't close unopened file descriptorsTaylor Blau, Feb 26, 2021
  2. Jeff KingFeb 26, 2021
  3. Johannes SchindelinMar 1, 2021
  4. Junio C HamanoFeb 26, 2021

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.