[ASan/Win tests] Remove the extra 'cat' in front of FileCheck now that it's clear...
[blocksruntime.git] / test / asan / TestCases / Windows / stack_array_right_oob.cc
blobac267bf7f27d3fe05405981224c1a640893065e3
1 // RUN: %clangxx_asan -O0 %s -Fe%t
2 // RUN: not %run %t 2>&1 | FileCheck %s
4 #include <stdio.h>
6 int main() {
7 int subscript = 42;
8 char buffer[42];
9 buffer[subscript] = 42;
10 // CHECK: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
11 // CHECK: WRITE of size 1 at [[ADDR]] thread T0
12 // CHECK-NEXT: {{#0 .* main .*stack_array_right_oob.cc}}:[[@LINE-3]]
13 // CHECK: Address [[ADDR]] is located in stack of thread T0 at offset [[OFFSET:.*]] in frame
14 // CHECK-NEXT: {{#0 .* main .*stack_array_right_oob.cc}}
15 // CHECK: 'buffer' <== Memory access at offset [[OFFSET]] overflows this variable