[cfe-commits] [PATCH] [msan] Support -fsanitize-memory-track-origins

Richard Smith richard at metafoo.co.uk
Thu Dec 20 16:50:09 PST 2012


  On Thu, Dec 20, 2012 at 9:29 AM, Evgeniy Stepanov <eugenis at google.com> wrote:
  >   I'm sure we don't want that. Track origins only makes sense with memory
  >   sanitizer.

  Hm, looks like we'll currently issue an error for:

  clang++ -fsanitize=memory -fsanitize-memory-track-origins
  -fno-sanitize=memory -fno-sanitize-memory-track-origins

  I don't think that's what we want. I also think it makes sense to
  accept this (imagine the first two arguments come from $CXXFLAGS, and
  the final one is a per-file override):

  clang++ -fsanitize=memory -fsanitize-memory-track-origins -fno-sanitize=memory

  Perhaps the best compromise would be to only check for the flag if MSan is enabled. Then we'd automatically produce an "argument unused during compilation" warning for it, and allow the compilation to proceed.

http://llvm-reviews.chandlerc.com/D224



More information about the cfe-commits mailing list