1 // RUN: %clangxx_msan -g %s -o %t
2 // RUN: not %run %t 2>&1 | FileCheck %s
9 FILE *f
= fopen("/dev/zero", "r");
11 unsigned read
= fread(&c
, sizeof(c
), 1, f
);
13 if (c
== '1') // No error
19 FILE *f
= fopen("/dev/null", "w");
21 if (fwrite(&c
, sizeof(c
), 1, f
) != sizeof(c
)) // BOOM
26 int main(int argc
, char *argv
[]) {
34 // CHECK: Uninitialized bytes in fwrite at offset 0 inside