[OptTable] Fix typo VALUE => VALUES (NFCI) (#121523)
[llvm-project.git] / compiler-rt / test / asan / TestCases / poison_partial.cpp
blob41f0942e6b9fb4c45854aaf793eaf4422b6cd1ee
1 // RUN: %clangxx_asan -O0 %s -o %t
2 // RUN: not %run %t 2>&1 | FileCheck %s
3 // RUN: not %run %t heap 2>&1 | FileCheck %s
4 // RUN: %env_asan_opts=poison_partial=0 %run %t
5 // RUN: %env_asan_opts=poison_partial=0 %run %t heap
6 #include <string.h>
7 char g[21];
8 char *x;
10 int main(int argc, char **argv) {
11 if (argc >= 2)
12 x = new char[21];
13 else
14 x = &g[0];
15 memset(x, 0, 21);
16 int *y = (int*)x;
17 return y[5];
19 // CHECK: 0 bytes after