[LLVMbugs] [Bug 22205] New: -disable-checker causes assert
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jan 12 00:38:57 PST 2015
http://llvm.org/bugs/show_bug.cgi?id=22205
Bug ID: 22205
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
asserts
$HOME/llvm-20150112/tools/clang/tools/scan-build/scan-build
--use-analyzer=$HOEM/llvm-20150112-build/Release+Asserts/bin/clang
--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/bca34ce8/attachment.html>
More information about the llvm-bugs
mailing list