git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Lars Schneider <larsxschneider@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 0/5] building git with clang/gcc address sanitizer
Date: Mon, 10 Jul 2017 11:58:31 -0400	[thread overview]
Message-ID: <20170710155831.3zxijp7bvbquvlau@sigill.intra.peff.net> (raw)
In-Reply-To: <40D62A0D-5636-4EC2-ABCB-14175FC541F9@gmail.com>

On Mon, Jul 10, 2017 at 04:40:42PM +0200, Lars Schneider wrote:

> > 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

      reply	other threads:[~2017-07-10 15:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-10 13:24 [PATCH 0/5] building git with clang/gcc address sanitizer Jeff King
2017-07-10 13:24 ` [PATCH 1/5] test-lib: set ASAN_OPTIONS variable before we run git Jeff King
2017-07-10 13:24 ` [PATCH 2/5] test-lib: turn on ASan abort_on_error by default Jeff King
2017-07-10 17:18   ` Junio C Hamano
2017-07-10 13:24 ` [PATCH 3/5] Makefile: add helper for compiling with -fsanitize Jeff King
2017-07-10 17:35   ` Junio C Hamano
2017-07-10 17:44     ` Jeff King
2017-07-10 18:07       ` Junio C Hamano
2017-07-10 20:02       ` Ramsay Jones
2017-07-11  4:44         ` Jeff King
2017-07-10 13:24 ` [PATCH 4/5] Makefile: turn off -fomit-frame-pointer with sanitizers Jeff King
2017-07-10 13:24 ` [PATCH 5/5] Makefile: disable unaligned loads with UBSan Jeff King
2017-07-15 17:18   ` René Scharfe
2017-07-16 10:17     ` Jeff King
2017-07-16 11:02       ` René Scharfe
2017-07-10 13:30 ` [PATCH 0/5] building git with clang/gcc address sanitizer Jeff King
2017-07-10 14:40 ` Lars Schneider
2017-07-10 15:58   ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170710155831.3zxijp7bvbquvlau@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=larsxschneider@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).