Add another failing use-after-scope test

Summary:
  Use after scope is not detected if array larger then 8 bytes.

Subscribers: kubabrecka

Differential Revision: http://reviews.llvm.org/D19572

llvm-svn: 268330
This commit is contained in:
Vitaly Buka 2016-05-02 23:12:04 +00:00
parent 3199c4e1ef
commit 9102fc20f8
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
// RUN: %clangxx_asan -O1 -mllvm -asan-use-after-scope=1 %s -o %t && \
// RUN: not %run %t 2>&1 | FileCheck %s
// XFAIL: *
// FIXME: This works only for arraysize <= 8.
char *p = 0;
int main() {
{
char x[1024] = {};
p = x;
}
return *p; // BOOM
}