summaryrefslogtreecommitdiff
path: root/test/sanitizer_common/TestCases/Linux/closedir.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/sanitizer_common/TestCases/Linux/closedir.c')
-rw-r--r--test/sanitizer_common/TestCases/Linux/closedir.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/sanitizer_common/TestCases/Linux/closedir.c b/test/sanitizer_common/TestCases/Linux/closedir.c
new file mode 100644
index 000000000000..990628db4027
--- /dev/null
+++ b/test/sanitizer_common/TestCases/Linux/closedir.c
@@ -0,0 +1,5 @@
+// Check that closedir(NULL) is ok.
+// RUN: %clang -O2 %s -o %t && %run %t
+#include <sys/types.h>
+#include <dirent.h>
+int main() { closedir(0); }