[compiler-rt] r268330 - Add another failing use-after-scope test
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Mon May 2 16:12:04 PDT 2016
Author: vitalybuka
Date: Mon May 2 18:12:04 2016
New Revision: 268330
URL: http://llvm.org/viewvc/llvm-project?rev=268330&view=rev
Log:
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
Added:
compiler-rt/trunk/test/asan/TestCases/use-after-scope-chars.cc
Added: compiler-rt/trunk/test/asan/TestCases/use-after-scope-chars.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-chars.cc?rev=268330&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-chars.cc (added)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-chars.cc Mon May 2 18:12:04 2016
@@ -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
+}
More information about the llvm-commits
mailing list