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

Re: Git Test Coverage Report (Thursday, Aug 15)

From
Jeff King <peff@peff.net>
Date
Aug 16, 2019, 18:15 UTC
Message-ID
<20190816181515.GA15741@sigill.intra.peff.net>
In-Reply-To
<20190816181103.GA13894@sigill.intra.peff.net>
On Fri, Aug 16, 2019 at 02:11:03PM -0400, Jeff King wrote:
Show 15 quoted lines
>           if (opts->ignore_whitespace) {
>                   struct strbuf buf = STRBUF_INIT;
>   
>                   if (strategy_opts)
>                           strbuf_addstr(&buf, strategy_opts);
>   
>                   strbuf_addstr(&buf, " --ignore-space-change");
>                   free(strategy_opts);
>                   strategy_opts = strbuf_detach(&buf, NULL);
>           }
> [...]
> (As an aside, this code leaks the newly allocated buffer and leaves a
> dangling pointer in opts->strategy_opts, but that's all orthogonal to
> the uncovered line; I'll send a separate message to the original
> author).

In case any of you were on the edge of your seat waiting for more discussion, it turns out that Phillip already noticed this problem during review:

  https://public-inbox.org/git/a505fdf3-5926-9765-21ef-b82334a3fba4@gmail.com/
So nothing to see here. :)
-Peff
Previous: Jeff KingNext: Derrick Stolee
Message 3 of 4 in “Git Test Coverage Report (Thursday, Aug 15)”
  1. Derrick StoleeAug 16, 2019
  2. Jeff KingAug 16, 2019
  3. Jeff KingAug 16, 2019
  4. Derrick StoleeAug 20, 2019

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.