1 // RUN: %clangxx_asan -O0 %s %p/Helpers/underflow.cpp -o %t && not %run %t 2>&1 | FileCheck %s
2 // RUN: %clangxx_asan -O1 %s %p/Helpers/underflow.cpp -o %t && not %run %t 2>&1 | FileCheck %s
3 // RUN: %clangxx_asan -O2 %s %p/Helpers/underflow.cpp -o %t && not %run %t 2>&1 | FileCheck %s
4 // RUN: %clangxx_asan -O3 %s %p/Helpers/underflow.cpp -o %t && not %run %t 2>&1 | FileCheck %s
9 int main(int argc
, char **argv
) {
10 memset(XXX
, 0, 2*sizeof(int));
11 // CHECK: {{READ of size 4 at 0x.* thread T0}}
12 // CHECK: {{ #0 0x.* in main .*global-underflow.cpp:}}[[@LINE+3]]
13 // CHECK: {{0x.* is located 4 bytes before global variable}}
14 // CHECK: {{.*YYY.* of size 12}}