[LLVMbugs] [Bug 23604] New: Warning when -fsanitize-coverage= is followed by -fno-sanitize=all

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed May 20 17:21:12 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23604

            Bug ID: 23604
           Summary: Warning when -fsanitize-coverage= is followed by
                    -fno-sanitize=all
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Driver
          Assignee: unassignedclangbugs at nondot.org
          Reporter: llvm-bugs at justinbogner.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

If sanitizers are turned off using -fno-sanitize=all, but -fsanitize-coverage=
flags were specified, we get a warning about an unused argument:

  % clang++ -fsanitize=address,undefined
-fsanitize-coverage=edge,indirect-calls,8bit-counters,trace-cmp
-fno-sanitize=all -x c++ -c /dev/null -o /dev/null       
  clang-3.7: warning: argument unused during compilation:
'-fsanitize-coverage=edge,indirect-calls,8bit-counters,trace-cmp'

This is poor behaviour since the -fsanitize-coverage flag was valid where it
was used, and it makes it difficult to disable sanitizers in a makefile using
-fno-sanitize=all.

You'll hit this issue if you build llvm using a cmake invocation including
"-DLLVM_USE_SANITIZER=Address;Undefined -DLLVM_USE_SANITIZE_COVERAGE=ON
-DLLVM_ENABLE_WERROR=ON".

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150521/a0386cc3/attachment.html>


More information about the llvm-bugs mailing list