]>
git.proxmox.com Git - rustc.git/blob - src/llvm/projects/compiler-rt/lib/asan/lit_tests/global-overflow.cc
1 // RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
2 // RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
3 // RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
4 // RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
5 // RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
6 // RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
7 // RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
8 // RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
11 int main(int argc
, char **argv
) {
18 int res
= YYY
[argc
* 10]; // BOOOM
19 // CHECK: {{READ of size 1 at 0x.* thread T0}}
20 // CHECK: {{ #0 0x.* in main .*global-overflow.cc:18}}
21 // CHECK: {{0x.* is located 0 bytes to the right of global variable}}
22 // CHECK: {{.*YYY.* of size 10}}
23 res
+= XXX
[argc
] + ZZZ
[argc
];