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

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

From
Duy Nguyen <pclouds@gmail.com>
Date
Jun 19, 2015, 10:51 UTC
Message-ID
<CACsJy8AJdjh_XjdEhhykBDMRPogMcV3LLCQpR2o1T3P1GkVKfw@mail.gmail.com>
In-Reply-To
<319721281.628788.1434711025325.JavaMail.zimbra@ensimag.grenoble-inp.fr>

On Fri, Jun 19, 2015 at 5:50 PM, Remi Galan Alfonso <remi.galan-alfonso@ensimag.grenoble-inp.fr> wrote:

Show 10 quoted lines
> Duy Nguyen <pclouds@gmail.com> writes:
>
>> + sb.buf[0] = 'Z';
>> + printf("%c\n", strbuf_slopbuf[0]);
>> + return 0;
>> startup_info = &git_startup_info;
>
> I might be wrong, but I definitely think that this
> printf and return 0 are some debug lines that you
> forgot to remove.

Yes it's debug code. I hoped that if I made a mistake forcing the segfault, people would notice.

-- 
Duy
Previous: Remi Galan AlfonsoNext: Junio C Hamano
Message 10 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.