[ASan/Win] Add a test case for r208215 [stack buffer overflow in <iostream>]

The issue re-appears if one uses the -fsanitize-blacklist= flag,
so it's time to have a test case.

llvm-svn: 227799
This commit is contained in:
Timur Iskhodzhanov 2015-02-02 12:31:11 +00:00
parent 54ba124098
commit 82cd135738
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: echo "42" | %run %t 2>&1 | FileCheck %s
#include <iostream>
int main() {
int i;
std::cout << "Type i: ";
std::cin >> i;
return 0;
// CHECK: Type i:
// CHECK-NOT: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
}