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: [email protected]
Reporter: [email protected]
CC: [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs