[LLVMbugs] [Bug 22204] New: -disable-checker causes assert

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jan 12 00:38:56 PST 2015


            Bug ID: 22204
           Summary: -disable-checker causes assert
           Product: clang
           Version: 3.4
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: kremenek at apple.com
          Reporter: adrian.swain at tibra.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I found this problem using clang 3.4 and checker-276.  I have just checked to
see if the problem still occurs with a trunk build of llvm + clang and it does.

ex.cpp - contains a divide by zero error

int main()
    int i = 0;
    return 1/i;

As soon as you try and disable the relevant core checker the static analyzer

--use-c++=$HOME/llvm-20150112-build/Release+Asserts/bin/clang -disable-checker
core.DivideZero clang -g -o ex ex.cpp

clang: /vault/home/adrian.swain/llvm-20150112/lib/Support/APInt.cpp:1866:
llvm::APInt llvm::APInt::udiv(const llvm::APInt&) const: Assertion `RHS.VAL !=
0 && "Divide by zero?"' failed.

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/20150112/21b594dc/attachment.html>

More information about the llvm-bugs mailing list