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

Re: [PATCH] strbuf: stop out-of-boundary warnings from Coverity

From
Jeff King <peff@peff.net>
Date
Jun 17, 2015, 19:12 UTC
Message-ID
<20150617191235.GB25304@peff.net>
In-Reply-To
<CAGZ79kbZpiz2rMbhJReFG=uRiQdj7a5qxLbRiPQQCFqcfBhikw@mail.gmail.com>
On Wed, Jun 17, 2015 at 10:58:10AM -0700, Stefan Beller wrote:
Show 6 quoted lines
> > Just make strbuf_slopbuf[] large enough to keep Coverity happy. If it's
> > happy, we'll have cleaner defect list
> 
> It's down 31 defects, roughly 10% of all things coverity detected as
> problematic.
> YAY!

That's a good thing. I do find the solution a little gross, though. I wonder if there is a way we can tell coverity more about how strbuf works. I've noticed similar problems with string_list, where it complains that we are touching list->items, which was assigned to NULL (of course it was, but then after that we did string_list_append!).

I know literally nothing about coverity's annotations and what's possible with them. So I may be barking up a wrong tree completely.

-Peff
Previous: Stefan BellerNext: Stefan Beller
Message 4 of 13 in “strbuf: stop out-of-boundary warnings from Coverity”
  1. strbuf: stop out-of-boundary warnings from CoverityNguyễn Thái Ngọc Duy, Jun 17, 2015
  2. Stefan BellerJun 17, 2015
  3. Stefan BellerJun 17, 2015
  4. Jeff KingJun 17, 2015
  5. Stefan BellerJun 17, 2015
  6. Duy NguyenJun 18, 2015
  7. Junio C HamanoJun 18, 2015
  8. Duy NguyenJun 19, 2015
  9. Remi Galan AlfonsoJun 19, 2015
  10. Duy NguyenJun 19, 2015
  11. Junio C HamanoJun 19, 2015
  12. Junio C HamanoJun 17, 2015
  13. Stefan BellerJun 17, 2015

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.