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

Re: [PATCH 0/5] building git with clang/gcc address sanitizer

From
Jeff King <peff@peff.net>
Date
Jul 10, 2017, 15:58 UTC
Message-ID
<20170710155831.3zxijp7bvbquvlau@sigill.intra.peff.net>
In-Reply-To
<40D62A0D-5636-4EC2-ABCB-14175FC541F9@gmail.com>
On Mon, Jul 10, 2017 at 04:40:42PM +0200, Lars Schneider wrote:
Show 10 quoted lines
> > If you want to see it in action, you can do:
> > 
> >  make SANITIZE=address
> >  ./git log -g HEAD HEAD >/dev/null
> > 
> > which finds a bug I recently fixed (but the fix isn't in master yet).
> 
> Do you think it would make sense to run these sanitizers on TravisCI
> to ensure they keep clean? If yes, should we run only "address" or all
> of them (if they run clean)?

Maybe. It's expensive and it's relatively rare that it catches anything. I used to run valgrind (which is even more expensive) once every release or so. This is much cheaper, but I've noticed that the Travis environment is a lot slower than my laptop. So it might take an hour to run there, which I think would trigger some timeouts?

I guess the best way is to try it and see. I probably wouldn't do an ASan run for each environment, but just one Linux ASan run, due to the CPU expense. (TBH, I think the existing gcc versus clang on both platforms is already slight overkill. But I guess if we have CPU to burn, more coverage is better than less).

I think "address" is the only one that runs clean right now. With some work I think we could get "undefined" to run clean. The others, I'm not so sure.

Some of them can actually be combined in a single build, but I'd have to dig into the documentation to see which (I think "thread" and "address" don't work well together, but "undefined" and "address" might). My SANITIZE trick doesn't handle multiple entries, but it could probably be taught to.

-Peff
Previous: Lars Schneider
Message 18 of 18 in “building git with clang/gcc address sanitizer”
  1. 0/5 building git with clang/gcc address sanitizerJeff King, Jul 10, 2017
  2. 1/5 test-lib: set ASAN_OPTIONS variable before we run gitJeff King, Jul 10, 2017
  3. 3/5 Makefile: add helper for compiling with -fsanitizeJeff King, Jul 10, 2017
  4. Junio C HamanoJul 10, 2017
  5. Jeff KingJul 10, 2017
  6. Junio C HamanoJul 10, 2017
  7. Ramsay JonesJul 10, 2017
  8. Jeff KingJul 11, 2017
  9. 2/5 test-lib: turn on ASan abort_on_error by defaultJeff King, Jul 10, 2017
  10. Junio C HamanoJul 10, 2017
  11. 5/5 Makefile: disable unaligned loads with UBSanJeff King, Jul 10, 2017
  12. René ScharfeJul 15, 2017
  13. Jeff KingJul 16, 2017
  14. René ScharfeJul 16, 2017
  15. 4/5 Makefile: turn off -fomit-frame-pointer with sanitizersJeff King, Jul 10, 2017
  16. Jeff KingJul 10, 2017
  17. Lars SchneiderJul 10, 2017
  18. Jeff KingJul 10, 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.