[ASan/Win] Add a comment about DCL-using-static vs threads
[blocksruntime.git] / test / msan / readdir64.cc
blob4f00d18387942df4430a352597dacb2e61b236fb
1 // RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t
2 // RUN: %clangxx_msan -m64 -O1 %s -o %t && %run %t
3 // RUN: %clangxx_msan -m64 -O2 %s -o %t && %run %t
4 // RUN: %clangxx_msan -m64 -O3 %s -o %t && %run %t
6 // RUN: %clangxx_msan -m64 -O0 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t
7 // RUN: %clangxx_msan -m64 -O1 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t
8 // RUN: %clangxx_msan -m64 -O2 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t
9 // RUN: %clangxx_msan -m64 -O3 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t
11 // Test that readdir64 is intercepted as well as readdir.
13 #include <sys/types.h>
14 #include <dirent.h>
15 #include <stdlib.h>
18 int main(void) {
19 DIR *dir = opendir(".");
20 struct dirent *d = readdir(dir);
21 if (d->d_name[0]) {
22 closedir(dir);
23 exit(0);
25 closedir(dir);
26 return 0;