1 // RUN: %clangxx_msan -g %s -o %t
3 // RUN: not %run %t 2 2>&1 | FileCheck %s --check-prefix=CHECK-FPUTS
4 // RUN: not %run %t 3 3 2>&1 | FileCheck %s --check-prefix=CHECK-PUTS
11 FILE *fp
= fopen("/dev/zero", "r");
14 if (!fgets(&c
, 1, fp
))
17 if (c
== '1') // No error
25 FILE *fp
= fopen("/dev/null", "w");
27 fputs(buf
, fp
); // BOOM
36 int main(int argc
, char *argv
[]) {
46 // CHECK-FPUTS: Uninitialized bytes in fputs at offset 0 inside
47 // CHECK-PUTS: Uninitialized bytes in puts at offset 0 inside