[LLVMbugs] [Bug 19495] New: Warn about out of scope tests
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Apr 20 11:59:41 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19495
Bug ID: 19495
Summary: Warn about out of scope tests
Product: clang
Version: 3.4
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
Assignee: kremenek at apple.com
Reporter: shachar at shemesh.biz
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
The following program:
static int arr[] = { 1, 2, 3, 4 };
int lookup( int index )
{
if( index<1 || index>4 )
return -1;
return arr[index];
}
Passes the static validator without a warning. This despite the off by one that
makes accessing element 0 impossible, and element 4 out of bounds.
--
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/20140420/fdc4a102/attachment.html>
More information about the llvm-bugs
mailing list