[llvm-bugs] [Bug 35419] New: False negative on post-increment of uninitialized value
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Nov 25 07:05:07 PST 2017
https://bugs.llvm.org/show_bug.cgi?id=35419
Bug ID: 35419
Summary: False negative on post-increment of uninitialized
value
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: dcoughlin at apple.com
Reporter: dcoughlin at apple.com
CC: llvm-bugs at lists.llvm.org
The analyzer doesn't diagnose when post incrementing an uninitialized variable:
$ cat test_pp_uninit.c
void foo() {
int p;
p++; // A diagnostic should be emitted here
}
$ clang -cc1 -analyze -analyzer-checker=core test_pp_uninit.c
$
It looks like the UndefinedAssignmentChecker is missing a case for
UnaryOperator in its checkBind() method.
This is a great starter bug.
--
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/20171125/3527f3b5/attachment.html>
More information about the llvm-bugs
mailing list