[LLVMbugs] [Bug 19191] New: checker doesn't work if there's a '-m' in the file path

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Mar 19 09:28:43 PDT 2014


            Bug ID: 19191
           Summary: checker doesn't work if there's a '-m' in the file
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: kremenek at apple.com
          Reporter: icculus at icculus.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

(tested against checker-276)

If you have a "-m" somewhere in a source file's path, checker thinks it's a
compiler option due to a buggy regexp.

To reproduce:

- Put any project you build with scan-build into a directory with with a "-m"
in it (in our case, it was "/buildbot/slave/SDL/sdl-macosx-checker/src"). If
your build doesn't supply full path names, just add a file to the project
called file-m.c.

- Run "scan-build make" or whatnot to build the project. Files that are passed
to ccc-analyzer with a "-m" will compile correctly but never report bugs.

The bug appears to be here, in ccc-analyzer

  if ($Arg =~ /-m.*/) {
    push @CompileOpts,$Arg;

There should probably be a '^' at the start of that regexp. I assume this is to
catch command line arguments like -msse2 or -m32, etc. Without that caret,
source files can get caught up in this test and don't get analyzed.


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/20140319/43ad1fd5/attachment.html>

More information about the llvm-bugs mailing list