[llvm-bugs] [Bug 28338] New: False positive: analyzer believes a value is garbage/undefined
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jun 27 19:29:20 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=28338
Bug ID: 28338
Summary: False positive: analyzer believes a value is
garbage/undefined
Product: clang
Version: 3.8
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: kremenek at apple.com
Reporter: mactalla.obair at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 16645
--> https://llvm.org/bugs/attachment.cgi?id=16645&action=edit
False positive test case
When reading an individual byte from a larger value, the static analyzer is
fine if:
a) reading any byte if the source is a uint32_t
b) reading the first byte if the source is a uint32_t[1]
But it falsely reports a problem if reading a subsequent byte from uint32_t[1]
The attached test case demonstrates good (silent) behaviour with VARIANT= 1, 2
and 3. And exposes the false positive with VARIANT=4.
I also tested with clang-3.7 and clang-3.6, so it's not a regression.
--
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/20160628/f44899f3/attachment.html>
More information about the llvm-bugs
mailing list