1 // RUN: %clangxx_msan -O0 -g %s -o %t
2 // RUN: not %run %t 2>&1 | FileCheck %s
3 // RUN: MSAN_OPTIONS=intercept_memcmp=0 %run %t
4 
5 #include <string.h>
main(int argc,char ** argv)6 int main(int argc, char **argv) {
7   char a1[4];
8   char a2[4];
9   for (int i = 0; i < argc * 3; i++)
10     a2[i] = a1[i] = i;
11   int res = memcmp(a1, a2, 4);
12   return res;
13   // CHECK: Uninitialized bytes in __interceptor_memcmp at offset 3
14   // CHECK: MemorySanitizer: use-of-uninitialized-value
15 }
16