[llvm-bugs] [Bug 33137] New: False positive on variable value
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue May 23 03:36:02 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=33137
Bug ID: 33137
Summary: False positive on variable value
Product: clang
Version: 4.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: kremenek at apple.com
Reporter: natale.patriciello at gmail.com
CC: llvm-bugs at lists.llvm.org
Created attachment 18493
--> https://bugs.llvm.org/attachment.cgi?id=18493&action=edit
The false positive report
In the source generated by the asn1c compiler, there is the function
der_write_tags. In this, the point 6 is (Assuming 'i' is >= 'tags_count'),
where i is 1. It means that tags_count < 1 (tags_count is an int).
Then, at line 140, there is this cycle:
140 for(i = tags_count - 1; i >= 0; --i) {
where the line (Assuming 'i' is >= 0) is printed two times. Giving the previous
assumption, this is clearly impossible.
I tried to make a small example, but I've failed; it seems that in simple
functions this is well understood by the analyzer.
--
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/20170523/2c8a09df/attachment-0001.html>
More information about the llvm-bugs
mailing list