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

Re: [PATCH 1/2] Fix nonnull errors reported by UBSAN with GCC 7.

From
Jeff King <peff@peff.net>
Date
Apr 6, 2017, 08:34 UTC
Message-ID
<20170406083425.7psdmrploxar3h6v@sigill.intra.peff.net>
In-Reply-To
<295981e7-d2e9-d3db-e32d-8dd80ca47136@suse.cz>
On Thu, Apr 06, 2017 at 10:02:22AM +0200, Martin Liška wrote:
> Subject: [PATCH 1/2] Fix nonnull errors reported by UBSAN with GCC 7.
> 
> Memory functions like memmove and memcpy should not be called
> with an argument equal to NULL.

Yeah, makes sense. Your fixes are obviously correct. In other cases we've added wrappers like sane_qsort() that do the size check automatically. I'm not sure if we'd want to do the same here.

Either way, it probably makes sense to take this as a quick fix and worry about refactoring as a possible patch on top.

Thanks.
-Peff
Previous: Martin LiškaNext: Martin Liška
Message 2 of 15 in “Fix nonnull errors reported by UBSAN with GCC 7.”
  1. 1/2 Fix nonnull errors reported by UBSAN with GCC 7.Martin Liška, Apr 6, 2017
  2. Jeff KingApr 6, 2017
  3. Martin LiškaApr 6, 2017
  4. René ScharfeApr 6, 2017
  5. Martin LiškaApr 6, 2017
  6. Johannes SixtApr 6, 2017
  7. René ScharfeApr 6, 2017
  8. Johannes SixtApr 6, 2017
  9. Martin LiškaApr 7, 2017
  10. René ScharfeApr 7, 2017
  11. 1/2 add MOVE_ARRAYRené Scharfe, Apr 7, 2017
  12. 2/2 use MOVE_ARRAYRené Scharfe, Apr 7, 2017
  13. Junio C HamanoApr 17, 2017
  14. Johannes SixtApr 17, 2017
  15. Johannes SchindelinApr 6, 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.