1*7c3d14c8STreehugger Robot // RUN: %clangxx_msan -O0 %s -o %t && %run %t 2*7c3d14c8STreehugger Robot // RUN: %clangxx_msan -O1 %s -o %t && %run %t 3*7c3d14c8STreehugger Robot // RUN: %clangxx_msan -O2 %s -o %t && %run %t 4*7c3d14c8STreehugger Robot // RUN: %clangxx_msan -O3 %s -o %t && %run %t 5*7c3d14c8STreehugger Robot 6*7c3d14c8STreehugger Robot // RUN: %clangxx_msan -O0 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t 7*7c3d14c8STreehugger Robot // RUN: %clangxx_msan -O1 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t 8*7c3d14c8STreehugger Robot // RUN: %clangxx_msan -O2 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t 9*7c3d14c8STreehugger Robot // RUN: %clangxx_msan -O3 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t 10*7c3d14c8STreehugger Robot 11*7c3d14c8STreehugger Robot // Test that readdir64 is intercepted as well as readdir. 12*7c3d14c8STreehugger Robot 13*7c3d14c8STreehugger Robot #include <sys/types.h> 14*7c3d14c8STreehugger Robot #include <dirent.h> 15*7c3d14c8STreehugger Robot #include <stdlib.h> 16*7c3d14c8STreehugger Robot 17*7c3d14c8STreehugger Robot main(void)18*7c3d14c8STreehugger Robotint main(void) { 19*7c3d14c8STreehugger Robot DIR *dir = opendir("."); 20*7c3d14c8STreehugger Robot struct dirent *d = readdir(dir); 21*7c3d14c8STreehugger Robot if (d->d_name[0]) { 22*7c3d14c8STreehugger Robot closedir(dir); 23*7c3d14c8STreehugger Robot exit(0); 24*7c3d14c8STreehugger Robot } 25*7c3d14c8STreehugger Robot closedir(dir); 26*7c3d14c8STreehugger Robot return 0; 27*7c3d14c8STreehugger Robot } 28