[LLVMbugs] [Bug 21485] New: -fsanitize=bounds does not detect out-of-bounds access
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Nov 5 03:50:08 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=21485
Bug ID: 21485
Summary: -fsanitize=bounds does not detect out-of-bounds access
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: polacek at redhat.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
int a[10];
void
foo (int x)
{
int v = a[x]++;
}
int
main ()
{
foo (10);
}
$ clang -fsanitize=bounds -O2 u2.c; ./a.out
says nothing. If I change foo (10); to foo (11);, then it's detected:
u2.c:5:11: runtime error: index 11 out of bounds for type 'int [10]'
--
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/20141105/08fb96f2/attachment.html>
More information about the llvm-bugs
mailing list